I was just curious why on our DB server (MySQL 5.7.24-log) on REDHAT ENTERPRISE 7.5 64-bit, it has so many mysql threads when that's the only thing running for moodle.
Is there a way I can debug this to see what is calling those threads?
thanks
Not sure what you mean by "the only thing running for moodle". Each process the web server creates for Moodle will start it's own database connection. On a busy site, you can easily see hundreds of them.
Hello Howard..
not talking about the web server request which makes sense but I'm talking about MySQL threads... if there is only one moodle database , shouldn't it just show one mysql process running not matter how many connections there are to that 1 database?
which reminds me.. I think php maybe better served off as php-fpm rather than as an apache directive as its more efficient from apache/php. Am I correct?
No - each connection generates a thread.
so in a way... logged in users in the last 5 mins should in theory, match or at least close to the number of threads shown ?
Each user accessing a Moodle resource can generate more than one thread. On the other hand, 5 minutes is too long for complete threads to persist. But... you would expect the number of threads to be vaguely proportional to the number of active users
BTW.... mod-php vs php-fpm, depends who you ask.
thanks..how is your php set up?
How true ... how true .. 'mod-php vs php-fpm, depends who you ask.'
Also kinda depends upon setup and current usage ... if web server (64 Gig) not the bottleneck, but dedicated DB server (also 64 Gig) seems to be is there really any 'advantage' running php-fpm? That may not fix DB server issue.
If one has only a 4 Gig server to work with and it's both web server and db server, then could see it ... trying to squeeze every once of blood there is on that box!
'spirit of sharing', Ken
Not moodle specific but more like php/apache setup.. I read that is the preferred method..