Could somebody please give some tips on how to improve web2py performance (WSGI apache + MySQL)? I have an application that receives Ajax requests from the client every few seconds to access database and return results. The server is a Ubuntu machine with 640 Mb RAM (virtual server on Amazon EC2, no Xserver).
There are 4 WSGI-processes in apache config. A newly started apache2 instance leaves ca 300 Mb free, but after a hundred requests the system is getting slow and there are long delays. Restarting the server helps to free up memory (I set up cron to do it every 30 minutes - but I guess it is bad practice).
Will be grateful for any advance! A more powerful server is not an option yet because of the budget.
Thanks in advance!