EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07695
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- From: Fran Callaghan <fran.callaghan@dcu.ie>
- Date: Thu, 14 Feb 2019 15:38:09 +0000
Hi Fran,
A couple of things to look at:
In ~/perl_lib/EPrints/Database/mysql.pm, do you have a line that references 'optimizer_search_depth'?
If not, this might be useful: https://github.com/eprints/eprints/issues/120
If you already have that, what about the storage engines the tables are using?
MyISAM uses table-level locking, but InnoDB use row-level locking.
I did some investigations a while ago, and found that some queries that looked like they shouldn't lock a table were doing so for some reason (I cannot recall the exact details - but I don't think it's an 'eprints' thing - I could recreate the scenario in the DB directly).
Any of that help?
Cheers,
John
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Fran Callaghan via Eprints-tech
Sent: 14 February 2019 14:50
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] New system, crashing periodically b/c MySQL Locking
Hi Everybody,
We have a (reasonably) new install that has been grinding to a halt every week or two. When I look at 'top' on the command line (Red Hat) mysqld is hogging 100% CPU. When I use mysqladmin processlist I can see a number of sessions queuing behind this...
| 104558 | doras | localhost | doras | Query | 1587 | statistics | INSERT INTO `cache17312`(`pos`, `eprintid`) SELECT @i:=@i+1, `eprintid` FROM (SELECT `eprint`.`eprin | 0.000 |
The other processes (queued) are all waiting for table level lock and look like this...
| 105134 | doras | localhost | doras | Query | 487 | Waiting for table level lock | UPDATE `eprint` SET `edit_lock_user`='1037', `edit_lock_since`='1550139932', `edit_lock_until`='1550 | 0.000 |
| 105135 | doras | localhost | doras | Query | 486 | Waiting for table level lock | SELECT `eprintid`,`rev_number`,`eprint_status`,`userid`,`importid`,`source`,`dir`,`datestamp_year`,` | 0.000
Eventually the max http processes is reached and the system crashes. The only remedy is to restart httpd and mariadb.
Any ideas what this insert into cache is and why it's locking the the system?
Thanks for any guidance
Fran Callaghan
Dublin City University
Séanadh Ríomhphoist/Email Disclaimer
Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é. Is féidir tuilleadh a léamh anseo.
This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Read more here.
Séanadh Ríomhphoist/Email Disclaimer
Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é. Is féidir tuilleadh a léamh anseo.
This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Read more here.
- Follow-Ups:
- Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- From: Fran Callaghan <fran.callaghan@dcu.ie>
- Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- References:
- [EP-tech] New system, crashing periodically b/c MySQL Locking
- From: Fran Callaghan <fran.callaghan@dcu.ie>
- Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- From: Fran Callaghan <fran.callaghan@dcu.ie>
- [EP-tech] New system, crashing periodically b/c MySQL Locking
- Prev by Date: Re: [EP-tech] New system, crashing periodically b/c MySQL Locking
- Next by Date: Re: [EP-tech] Error when running irstats
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):