Problem of database connection

OSSN USER Posted in Technical Support 7 years ago

Hello,
Since this morning i have an error message of database

the message is the following :

Warning: mysqli::mysqli(): (HY000/1226): User 'commu872851' has exceeded the 'maxconnectionsper_hour' resource (current value: 16000) in /htdocs/network/classes/OssnDatabase.php on line 20

Fatal error: Call to a member function set_charset() on boolean in /htdocs/network/classes/OssnDatabase.php on line 73

What can i do ?

Thanks

Replies
Dutch OSSN USER Replied 7 years ago

I looked with several hosts, all advice me to take a VPS server plan. Too complicated.
We have to install and configure the server ourself.
It is a work of an senior technician, network administrator or even network engineers.

Dutch OSSN USER Replied 7 years ago

You are right Rally Homelancer. That's why I look to take a VPS hosting plan. But as my website is free, i cannot take something expensive. So I look the differents providers.

(personnal message, i am fascinated by your knowledges in php developement. God i would love to know php like you !) ;-)

ph Rally Homelancer Replied 7 years ago

Even if spacing the requests wont do you any good especially if your Ossn site is getting new users. Remember, you are running a Social Network site. People are bound to flock to your site when your registered users invite their friends or family to join them on your site.

You might need to switch to a different hosting provider or get a better hosting plan without these limits or at least get a plan with with higher limits.

Dutch OSSN USER Replied 7 years ago

12 requests par minute means 1 request every 5 seconds. Is it possible to space the requests ?

German Michael Zülsdorff Replied 7 years ago

>... or a page making several refreshes creating each time a new connection to the database....

Of course Ossn IS doing several refreshes. How would you receive notifications or answers of your chat partners in a reasonable time otherwise?!

Talking about 1 user and the chat component enabled you'll get a minimum of
12 requests/minute
= 720 requests/hour

That means: 22 concurrently logged in users are already hitting your provider's limit of 16000.

Dutch OSSN USER Replied 7 years ago

4.3.1

Slovak Ondrej Janicko Replied 7 years ago

What version of OSSN are you using?

Dutch OSSN USER Replied 7 years ago

Following that problem i contacted my host. He answered me that this problem could come from a script doesn't close some connections to the database correctly or a page making several refreshes creating each time a new connection to the database.

He didn't told me to change of hosting plan to take something bigger.
That's what I thought a the first time that's why I wrote on this community. A begin just my activity i have 50 members and i cannot make so much connections in one hour

pk Malik Umer Farooq Replied 7 years ago

It doesn't means user register it means PHP connect with database server
When anyone register/login or whatever he do in your web new connection open and send record to database or retrieve your hosting provider limited connection per hours contact to your hosting provider for increasing limit or move your web to VPs or dedicated hosting

Dutch OSSN USER Replied 7 years ago

A question . When you have 'maxconnectionsper_hour' resource (current value: 16000), it means that the number max of users connected on the site in the same time per hour is 16000 ?

If yes, for now i am far of this number of connexions