0

I have a file, let's call it a.php, which executes a long cycle of iterations, each one of them makes some queries to the database. To complete the cycle, it takes quite some time (some hours).

My problem is that, while a.php is being processed, if I open a completely different page (b.php) that has just one Mysql query, it hangs on loading until a.php is done.

So my question is: how can I prevent this? I want a.php being processed and the ability to open different pages that also require Mysql.

The maximum 'thread_connected' I got from Mysql, with a.php being executed, is 10, and the 'max_connections' value is set to 151.

1 Answer 1

0

It sounds like your files are trying to consume the same MySQL connection. Each file needs to open its own DB connection and then they can both operate independently.

a.php > use connection_a
b.php > use connection_b 
etc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .