2016-09-27

I have a PHP bot running on a shared host. My account often get suspended. When I asked to web hosting service, they said that my account suspended because of excessive MySQL usage.

There is an upload.php and db_functions.php files. Upload PHP runs every half hour. I open and close MySQL connections in every function.

Is building a MySQL connection at the beginning of the upload.php and closing at the end of the upload.php able to prevent excessive usage?

Which one is effective between these two situation?

1st situation

upload.php

db_functions.php

2nd situation

upload.php

db_functions.php

Show more