Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CherryPy and concurrency

I'm using CherryPy in order to serve a python application through WSGI.

I tried benchmarking it, but it seems as if CherryPy can only handle exactly 10 req/sec. No matter what I do.

Built a simple app with a 3 second pause, in order to accurately determine what is going on... and I can confirm that the 10 req/sec has nothing to do with the resources used by the python script.

__

Any ideas?

like image 779
RadiantHex Avatar asked Aug 23 '26 19:08

RadiantHex


1 Answers

By default, CherryPy's builtin HTTP server will use a thread pool with 10 threads. If you are still using the defaults, you could try increasing this in your config file.

[global]
server.thread_pool = 30
  • See the cpserver documentation
  • Or the archive.org copy of the old documentation
like image 51
diatoid Avatar answered Aug 25 '26 09:08

diatoid