Mysql performance issue -Home > Students > Manage Applications take long time to save data

I am hosting gibbon on the AWS t2.medium instance (bacillary on t2.micro increase size due to performance issue)

  • There are a total of 2 std and 104-110 students in the system.
  • other read-only pages have good performance but when I follow the following test case the there is a performance issue.
  1. I am adding multiple students via the application form
  2. I am accepting the application form
    Home > Students >Manage Applications
    the first form is accepted quickly but when i click on next form the response time is increasing it goes to 20 to 30 seconds . and that same time i can not access read-only pages also . it looks like the issue is in MySQL connection thread . in our application we are opening only one connection and it is waiting for closing

Mysql> show processlist;
±----±-----±----------±-----±--------±-----±---------±-----------------+
| Id | User | Host | db | Command | Time | State | Info |
±----±-----±----------±-----±--------±-----±---------±-----------------+
| 21 | root | localhost | NULL | Query | 0 | starting | show processlist |
| 301 | star | localhost | star | Sleep | 40 | | NULL |
±----±-----±----------±-----±--------±-----±---------±-----------------+

please check some following links

https://stackoverflow.com/questions/19822558/how-to-set-max-connections-in-mysql-programmatically

https://stackoverflow.com/questions/12194241/show-processlist-in-mysql-command-sleep

can you please suggest me how to increase performance? any suggestions for MYSQL tuning

regards
Pavan PAwar

Issues related to the restriction to one mysql connection sound very familiar to me. It used to occur frequently in test setups with wamp.

I was never able to fix this. Switching to linux in a vm, shared or dedicated server fixed this for us and such issues never occurred again.

Hi Meierrom ,

Thank you for the information but i am hosting this site on ububtu server with virtualmin shared hosting. Is there any way in code fix like mysql connection pull or properly closing the connections ?

Regards,
Pavan Pawar

Sorry, I don’t know. @ross @admin

Hi Pavan Pawar,

Sorry for the wait, just back from summer break. The application form, when accepted, can send a number of emails to admin, students, parents, etc. depending on the settings. This is often the cause of the form taking a long time to submit, rather than a database issue. Depending on the email settings and speed of the server, it can take a couple of seconds to send each email, and if the form sends a number of emails this can add up. We’re looking into background processes for email sending in v19, but for now you could look into the speed of your email server, whether you’re using local sendmail or SMTP settings.

Hope this helps!