4 ms·
Database drivers (Redis, MySQL, Tokyo Tyrant etc.) and a bad query/overheated database server can easily take over 1 sec execution, which would basically stall
by amix 16y ago
Database drivers (Redis, MySQL, Tokyo Tyrant etc.) and a bad query/overheated database server can easily take over 1 sec execution, which would basically stall your servers each time such a query is run. File handling and system calls are blocking in Python. E.g. if your system call is expensive - say you are processing an image via imagemagick, very common for most web applications, then it will block your server.
- BarkMore 16y agoBlocking for short periods of time is fine if you run more than one instance of the python application per core. If database database access is taking more than a second, then I recommend fixing that problem first.