Database issue


So my website is here: Garrasi (

And the issue is that when I do log in, sometimes it tells me this error from the infinityfree database, but I don’t understand it, may I please know what does that mean and how to fix it?

On XAMPP there are not such issues. and the variable is 151 for max user connections and it is 200 on mine, so it’s way enough


Read these?

This is free hosting. Therefore limits do apply. If you need more, upgrade to premium hosting


The space given by infinity free is way enough, the variable max users is 200 on infinity free but for 151 on localhost it works so I think the issue is from somewhere else

I found more details

and those 2 ones "Warning: PDO::prepare(): SQLSTATE[00000]: No error: PDO constructor was not called in /home/vol1_8/ on line 30

Fatal error: Uncaught Error: Call to a member function execute() on null in /home/vol1_8/ Stack trace: #0 /home/vol1_8/ PostManager->listPost() #1 {main} thrown in /home/vol1_8/ on line 31"

The comment part was fixed, but the error below is still relevant, thing is that I have no clue on how to fix it

The limit for max_user_connections on InfinityFree is only 4. This should be plenty for most websites, assuming your code only opens one database connection per request, and closes them when done.

I took a quick look at your code, and the general setup seems to be put quite well together, and you already have a single database connection being passed around, so that’s good!

In the database setup code, you do appear to have one particular option enabled that’s causing all of your problems: persistent MySQL connections.

This option doesn’t work well on our hosting, and may not work at all. In very specific server setups (if you have your own server with PHP-FPM for example), it can work, but on a shared server that’s set up the way we’ve set up our hosting, enabling Persistent Connections just results in a large number of connections that are open simultaneously but cannot be used by your application.

Here is another topic from some time ago where someone else had a similar problem with persistent connections:

For you, the solution is much simpler though, no need to refactor your code. All you need to do is disable MySQL Persistent Connections and you shouldn’t ever see this error again.


Would that mean I need to use another server other than infinityfree?

No, did you read Admins reply?

All you need to do is disable MySQL Persistent Connections and you shouldn’t ever see this error again.


I did read the reply, and I thought I needed to take another server and then disable this option, which I found contradictory, hence why I wondered.

Back to the point, may I please know how can it be disabled please?

I found out, and now it works, thanks!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.