Status
Not open for further replies.

kolenoblata

Customer
I just installed it, activate and after 1 hour I start geting tons of email like:
---------------------------
Database error in vBulletin :

mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (42000/1203): User xxxx already has more than 'max_user_connections' active connections
[path]/public_html/includes/class_core.php on line 1265
---------------------------

I have max_user_connections set to 300 which is already high and not recomanded to go higher. I had same problem with one mod and only solution was to disable it. Did anyone test this mode on biger boards ( 1000 users online ) ?


Edit:

After few 1000 of emails and lot of complains of database errors I had to disabled hack.
This is not what I expected. Hope I didn't waste money.
 
Last edited:
vBActivity doesn't open a new connection, it uses the connection already established by vBulletin. Disabling / enabling mods shouldn't have an effect - at least not DBTech mods, ibProArcade opens its own database connection which could be a source of an error such as this one.

You may want to try enabling persistent connections in config.php, and also to install this mod: http://www.vbulletin.org/forum/showthread.php?t=218620
 
I don't have ibProArcade arcade. You said vbactivity doesn't have anything with new connections.
How do you explain that this happened to me as soon as I installed product and didn't stop untill I disable it.
 
Higher activity on your site with it being installed, perhaps? I don't know. At any rate, let me know if the changes I suggested had any effect :)
 
That mod doesn't have any effect to server, ony thing I can do is to enable persistent connections. What number I should start with and what is max I should try?
It is little strange for me to enable it, because when I has this problem everyone suggest me to turn it of.
 
1. That mod will prevent you from getting 1000 emails every time there's an error.
2. It's only 1 or 0, and as for why people tell you to turn it off, I don't know. I'm not sure if it will help or not, but it's an idea :p
 
I found something what you can maybe track. I enabled hack again, and it was working few minutes. I went to activity page, click to Leaderboards and it was trying to load page . I went to see what is happening when I click on it and firs my memory used start jumping from 25% to 50% and when it reach 52-53% load sturt jumping from 1 to 15 ( Leaderboards page never manage to open ).
After that got emails about connections.
Disabled hack again until I solve this.
 
Hi kolenoblata,

In the emails do they provide more details to the error, like time/script location and user? If you could provide the full error that may help locate where it's being triggered - especially if it's always in the same location. Feel free to remove any sensitive information like full script path/IP addresses :)
 
That's strange. If it was vBActivity causing the problem then we would expect that the script would always be the same...
 
But what else would be? Two times it happened only when VBactivity was enabled and stoped after disabling. It has something with Leaderboards.
 
Ok, I remove manualy Leaderboards button from template so nobody can use it, and enable hack. After 15h of working I didn't have any problem. However, I try to open that page two times manualy entering url and both times I had same issue.
So the problem is 100% with Leaderboards.
 
No problem, here you go:
[mysqld]
datadir=/var/lib/mysql
skip-locking
safe-show-database
old_passwords=1
long_query_time=2
log-slow-queries=/var/log/mysql-slow-queries.log
query_cache_limit=1M
query_cache_size=32M
query_cache_type=1
max_user_connections=300
max_connections=500
thread_cache_size=256
table_cache=16384
key_buffer=64M
max_connect_errors=20
max_allowed_packet=128M
join_buffer=2M
record_buffer=1M
 
Hey kolenoblata,

We've been investigating the issue as much as we can from our side of things without requesting any FTP info and so far this is what we've come up with.

1. The MySQL error is a result of misconfiguration, you have max connections at 500 yet max user connections is at 300, so mysql will always yeild the error if activity is high, ideally these two settings should match. This however is not the root cause of the MySQL error, just what triggers it.

2. You originally posted this error to us:
Code:
mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (42000/1203): User xxxx already has more than 'max_user_connections' active connections
[path]/public_html/includes/class_core.php on line 1265

I can tell you that line #1265 on includes/class_core.php is:
Code:
$connect = $this->functions['connect']($link, $servername, $username, $password, '', $port);

This is stock vBulletin code, connecting to the database which occurs before any normal/standard modification executes on vBulletin. However non-standard modifications can execute before vBulletin which may be conflicting with something and invoking the error. My theory was that something would have to loop the page over and over to generate that error within vBulletin, which vBActivity does not (supported by the fact no one else gets this error and it's very specific to "Leaderboards" for you).

3. To test my theory I registered on your site and went to vBActivity, I didn't let leaderboards load fully because I could see it looping requests (it was 16 seconds then I aborted the request). I noticed then you had vBSEO which is a non-standard vBulletin addon which does execute before vBulletin and handles redirects to support its url-rewriting feature and such.

I cannot confirm it is a vBSEO conflict however until you run a couple of tests:

- Disable vBSEO and see if leaderboards works
- If disabling vBSEO works, check to see if you have any custom rewrite rules which have keywords like "leaderboards", my guess is you do otherwise this would be happening on all vbactivity pages and likely other users would have reported it that are using vBSEO.

Hopefully we're on the right tracks here and I hope you understand our thought-process, we're not trying to shift blame or anything - just identify the root cause :)
 
Last edited:
Is there any vBSEO rewrites you have that contain "leaderboards"?

If not then there must be another mod on your forum conflicting which is causing the redirects.
 
No, I don't have leaderboards in rewrites, I checked that when you told me to.
Only thing I can do now is to disable other mods one by one to see if any of them is in conflict with this. But this is not my main problem now sinse I removed leaderboards from forum and everything else is working just fine. My main problem is this:

http://www.dragonbyte-tech.com/threads/1243-Still-problem-with-Credits

I PM'ed Darkwaltz4 few days ago but I never got any answer. I guess he doesn't have time so if someone else can look in to this. I still can't use that mod sinse I bought it.

Thanks
 
Status
Not open for further replies.
Back
Top