Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python bottle process reach timeout connection

Tags:

python

bottle

I have a problem that after certain amount of time my bottle server is not reachable and you get connection reset- timeout connection error.

When checking if the process is running, I found it running, but after killing the process and running it again the server return to serve requests.

Any idea what it could be? I wrapped most of my functions with exception catching , but didn't helped me to understand the problem. I wonder if anybody has used bottle and had encountered such problem

like image 674
JavaSa Avatar asked Feb 26 '26 11:02

JavaSa


1 Answers

My guess is because bottle is single threaded, and it's hanging on a request. I would suggest trying a multi-threaded server, such as cherrypy, to see if that resolves the issue. Then go back and see where the hangup was at.

Install cherrypy

pip install cherrypy

Update your python file

bottle.run(myapp, server='cherrypy')

Would need to see more code to identify any specific issue.

like image 137
CasualDemon Avatar answered Feb 28 '26 00:02

CasualDemon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!