MySQL connection limit and PHP MySQL connections -


I'm having a frustrating problem In my web service, there is an email for php module in brief, once my user Sends an email to my dedicated email address, then my mail server captures email, pipe into PHP script running on my server This PHP script opens a MySQL connection and saves e-mail content to the database.

So far it is so good once the MySQL connection limit exceeds /etc/my.cnf, then the problem starts up is set to 500. If 500 or more users send email at the same time, my MySQL is unable to manage the new connection.

What do you suggest? Should I use a continuous MySQL connection or any other method like writing the received email content in a txt file and then save it to DB with a cron job?

Thank you for your suggestions!


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -