Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik doesnt closes mysql connections with HHVM #7555

Closed
jg-development opened this issue Mar 27, 2015 · 10 comments
Closed

Piwik doesnt closes mysql connections with HHVM #7555

jg-development opened this issue Mar 27, 2015 · 10 comments
Labels
answered For when a question was asked and we referred to forum or answered it. Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@jg-development
Copy link

Hi,
I am using the newst Piwik version 2.12.1 with hhvm 3.6.1.
I have a problem that piwik doesnt close all the mysql connections. Instead it quickly growth
to the current limit of 151.
I can see that with "show processlist" in the mysql console.
I switched back to php 5.5.22 and now it works as usual.

Are there any problem with piwik/mysql connections and hhvm?

| 350 | piwik      | localhost:56494 | piwik      | Sleep   |  330 |       | NULL             |
| 351 | piwik      | localhost:56498 | piwik      | Sleep   |  329 |       | NULL             |
| 352 | piwik      | localhost:56502 | piwik      | Sleep   |  329 |       | NULL             |
| 353 | piwik      | localhost:56506 | piwik      | Sleep   |  329 |       | NULL             |
| 354 | piwik      | localhost:56510 | piwik      | Sleep   |  329 |       | NULL             |
| 355 | piwik      | localhost:56514 | piwik      | Sleep   |  329 |       | NULL             |
| 356 | piwik      | localhost:56518 | piwik      | Sleep   |  329 |       | NULL             |
| 357 | piwik      | localhost:56522 | piwik      | Sleep   |  329 |       | NULL             |
| 358 | piwik      | localhost:56527 | piwik      | Sleep   |  329 |       | NULL             |
| 359 | piwik      | localhost:56531 | piwik      | Sleep   |  329 |       | NULL             |
| 360 | piwik      | localhost:56535 | piwik      | Sleep   |  329 |       | NULL             |
| 361 | piwik      | localhost:56541 | piwik      | Sleep   |  329 |       | NULL             |
| 362 | piwik      | localhost:56545 | piwik      | Sleep   |  328 |       | NULL             |
| 363 | piwik      | localhost:56549 | piwik      | Sleep   |  328 |       | NULL             |
| 364 | piwik      | localhost:56553 | piwik      | Sleep   |  328 |       | NULL             |
| 365 | piwik      | localhost:56557 | piwik      | Sleep   |  328 |       | NULL             |
| 366 | piwik      | localhost:56561 | piwik      | Sleep   |  328 |       | NULL             |
| 367 | piwik      | localhost:56565 | piwik      | Sleep   |  328 |       | NULL             |
| 368 | piwik      | localhost:56569 | piwik      | Sleep   |  328 |       | NULL             |
| 369 | piwik      | localhost:56573 | piwik      | Sleep   |  328 |       | NULL             |
| 370 | piwik      | localhost:56577 | piwik      | Sleep   |  328 |       | NULL             |
| 371 | piwik      | localhost:56582 | piwik      | Sleep   |  328 |       | NULL             |
| 372 | piwik      | localhost:56588 | piwik      | Sleep   |  328 |       | NULL             |
| 373 | piwik      | localhost:56597 | piwik      | Sleep   |  327 |       | NULL             |
| 374 | piwik      | localhost:56601 | piwik      | Sleep   |  327 |       | NULL             |
| 375 | piwik      | localhost:56605 | piwik      | Sleep   |  327 |       | NULL             |
| 376 | piwik      | localhost:56609 | piwik      | Sleep   |  327 |       | NULL             |
| 377 | piwik      | localhost:56613 | piwik      | Sleep   |  327 |       | NULL             |
| 378 | piwik      | localhost:56617 | piwik      | Sleep   |  327 |       | NULL             |
| 379 | piwik      | localhost:56621 | piwik      | Sleep   |  326 |       | NULL             |
| 380 | piwik      | localhost:56625 | piwik      | Sleep   |  326 |       | NULL             |
| 381 | piwik      | localhost:56629 | piwik      | Sleep   |  326 |       | NULL             |
| 382 | piwik      | localhost:56633 | piwik      | Sleep   |  326 |       | NULL             |
| 383 | piwik      | localhost:56637 | piwik      | Sleep   |  326 |       | NULL             |

Greetings
Jan

@mattab
Copy link
Member

mattab commented Apr 8, 2015

Hi @jg-development

it's possible there is a problem with HHVM as we don't currently test for it (although I heard Piwik users using it with some success)

Do you see the number of mysql connections increase even without visiting the dashboard? (if confirmed it would be a bug in the tracker not closing connections)

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Apr 8, 2015
@mattab mattab added this to the Short term milestone Apr 8, 2015
@jg-development
Copy link
Author

Hi,
the mysql connection are increasing fast with using the piwik dashboard (10-20 per page view). I can test it with the tracker alone and give you feedback. But I think the tracker alone works.
Greetings Jan

@approached
Copy link

+1
I have same issue. After using piwik dashboard. Maybe there is bug in a tracker too!
The archive proccess works fine.

@florianbeer
Copy link

Same problem here. Every connection being initiated by Piwik when running on hhvm is left open. Refreshing the admin interface quickly fills the connection count up to the maximum. Activating PHP on the Piwik host instead of hhvm doesn't present this issue.

Debian 7.8
hhvm 3.6.1~wheezy
Piwik 2.12.1
MySQL 5.5.43-0+deb7u1

@asafyish
Copy link

I can confirm it happens also on:
HHVM 3.7
Debian: 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64 GNU/Linux
MySQL 5.6 on Amazon RDS

@pasalic
Copy link

pasalic commented May 31, 2015

Also confirmed same issue on HHVM 3.8
CentOS Linux release 7.1.1503
MariaDB : 5.5.41

@pasalic
Copy link

pasalic commented Jun 1, 2015

Hey guys i have a temporary fix. I set the wait_timeout and interactive_timeout for mysql to 300.
I don't know if this is the right way to do it but at least i don't get those pesky db connection errors now.
mysql> SET GLOBAL wait_timeout=300;
mysql> SET GLOBAL interactive_timeout=300;
I also set the SET GLOBAL max_connections = 500;

reference : http://forums.mysql.com/read.php?22,563616,563830#msg-563830
http://club.orbisius.com/howto/web-development/change-mysqls-wait_timeout-interactive_timeout-variables/

@Loscillo
Copy link
Contributor

Hi,

This probably comes from HHVM himself as may indicate that issue : facebook/hhvm#5132.

@mattab
Copy link
Member

mattab commented Jun 18, 2015

Hi guys,

Facebook has posted a patch for the HHVM issue, if anyone is able to test and give them feedback it will help HHVM team: facebook/hhvm#5132 (comment)

@mattab mattab modified the milestones: Mid term, Short term Jul 6, 2015
@mattab
Copy link
Member

mattab commented Sep 11, 2015

This issue was fixed in HHVM - kuddos @Loscillo for feedback-ing hhvm team

@mattab mattab closed this as completed Sep 11, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Sep 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

7 participants