happylama
Regular Member
- Aug 1, 2016
- 485
- 184
Hi ,
So basically , I have 2 vps connected to each other, at least once a day I have to send data from the first vps to the second, so I have a script that opens mysqli connection from the first server to the second and it starts writing in it's database, the problem is , once it starts writing in the database the website in the second server becomes slower, the script keeps working for around 30 minutes, after 5 minutes of writing the website hosted in the second server becomes unaccessible , which means it times out, after investigating I found out that Apache requests currently being processed stays crowded even after the script has stopped , it's like each "insert" in the database that happened in the script is still alive and using memory and cpu, even tho that the database is already filled.
any idea of how to prevent this ?
So basically , I have 2 vps connected to each other, at least once a day I have to send data from the first vps to the second, so I have a script that opens mysqli connection from the first server to the second and it starts writing in it's database, the problem is , once it starts writing in the database the website in the second server becomes slower, the script keeps working for around 30 minutes, after 5 minutes of writing the website hosted in the second server becomes unaccessible , which means it times out, after investigating I found out that Apache requests currently being processed stays crowded even after the script has stopped , it's like each "insert" in the database that happened in the script is still alive and using memory and cpu, even tho that the database is already filled.
any idea of how to prevent this ?