Error 5 Hy000 Out Of Memory
Contents |
Community Podcasts MySQL.com Downloads Documentation Section Menu: MySQL Forums :: General :: ERROR 5 (HY000):
Magento Sqlstate Hy000
Out of memory New Topic Advanced Search ERROR 5 mysql error 5 hy000 out of memory (HY000): Out of memory Posted by: Julien Lamarche () Date: August 05, 2011 02:29PM mysql errcode 5 Running a CiviCRM query at http://pastebin.com/6M1emH14, I get ERROR 5 (HY000): Out of memory (Needed 1640964 bytes) Though I can submit a query change
Mysql Out Of Memory Error
recommendation to CiviCRM, I'm hoping this can be fixed by adding an index or changing a parameter in the my.cnf file. Should I increase key_buffer_size or table_cache or is it another parameter? An InnoDB parameter perhaps (CiviCRM tables are all InnoDB)? +----+--------------------+-----------------------------------------+-----------------+------------------------------------------------------------------------------------+------------------+---------+---------------------------+--------+------------------------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+--------------------+-----------------------------------------+-----------------+------------------------------------------------------------------------------------+------------------+---------+---------------------------+--------+------------------------------+ | 1 | PRIMARY | contact_a | index | NULL | index_is_deleted | 1 | NULL | 149732 | Using index; Using temporary | | 1 | PRIMARY | civicrm_group_contact-605 | ref | UI_contact_group | UI_contact_group | 4 | step2_crm_db.contact_a.id | 1 | Distinct | | 1 | PRIMARY | civicrm_group_contact-608 | ref | UI_contact_group | UI_contact_group | 4 | step2_crm_db.contact_a.id | 1 | Distinct | | 1 | PRIMARY | civicrm_group_contact-612 | ref | UI_contact_group | UI_contact_group | 4 | step2_crm_db.contact_a.id | 1 | Using where; Distinct | | 7 | DEPENDENT SUBQUERY | civicrm_group_contact | unique_subquery | UI_contact_group,FK_civicrm_group_contact_group_id | UI_contact_group | 8 | func,const | 1 | Using where | | 6 | DEPENDENT SUBQUERY | civicrm_value_1_riding__circonscription | eq_ref | unique_entity_id,FK_civicrm_value_1_riding__circonscription_entity_id,INDEX_riding | uniqu
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up out of memory error from mysql up vote 1 down vote favorite 1 we have a web application (racktables) that's giving us grief on our production box. whenever users try to run a search, it gives the following error: http://forums.mysql.com/read.php?20,429609,429609 Pdo exception: PDOException SQLSTATE[HY000]: General error: 5 Out of memory (Needed 2057328 bytes) (HY000) I cannot recreate the issue on our backup server. The servers match except for the fact that in production we have 16GB RAM and our backup we have 8GB. It's a moot point though because both are running 32 bit os's and so are only using 4GB of RAM. we also have set up a swap partition... Here's what i get back from the "free -m" command in production: http://stackoverflow.com/questions/22203192/out-of-memory-error-from-mysql prod:/etc# free -m total used free shared buffers Mem: 3294 1958 1335 0 118 -/+ buffers: 1839 1454 Swap: 3817 109 3707 prod:/etc# I've checked to make sure that my.cnf on both boxes match. The database from production was replicated onto the backup server... so the data matches as well. I guess our options are to: A) convert the o/s to 64 bit so we can use more RAM. B) start tweaking some of the innodb settings in my.cnf. But before I try either A or B, I wanted to know if there's anything else I should compare between the two servers... seeing how the backup is working just fine. There must be a difference somewhere that we are not accounting for. Any suggestions would be appreciated. mysql linux out-of-memory share|improve this question asked Mar 5 '14 at 16:17 dot 2,936154177 See mysql.rjweb.org/doc.php/memory –eggyal Mar 5 '14 at 17:10 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted I created a script to simulate load on the backup server and was able to then to recreate the out of memory error message. In the end, i added the "join_buffer_size" setting to my.cnf and set it 3 MBs. That has resolved the issue. ps. I downloaded and ran tuning-primer.sh as well as mysqltuner.pl to narrow down the issues. share|improve this answer answered Mar 6 '14 at 20:05 dot 2,936154177 tuning-primer.sh and mysqltuner.pl are useful, thanks! –ostrokach
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://dba.stackexchange.com/questions/1927/why-does-mysql-say-im-out-of-memory the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn out of from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Why does MySQL say I'm out of memory? up vote 8 down vote favorite 7 I was trying to execute a fairly out of memory large INSERT...SELECT in MySQL with JDBC, and I got the following exception: Exception in thread "main" java.sql.SQLException: Out of memory (Needed 1073741824 bytes) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) Since I'm not actually returning a ResultSet object, I thought the Java heap space shouldn't be an issue. However, I tried to up it anyway and it did no good. I then tried to execute the statement in MySQL Workbench and I got essentially the same thing: Error Code 5: Out of memory (Needed 1073741816 bytes) I should have plenty of RAM to complete these operations (enough to fit the whole table I'm selecting from), but I'm guessing there are various settings I need to tweak to take advantage of all my memory. I'm running an Amazon EC2 High Memory Double Extra Large Instance with a Windows Server 2008 AMI. I've tried fiddling with the my.ini file to use better settings, but for all I know I might have made things worse. Here's a dump of that file: [client] port=3306 [mysql] default-character-set=latin1 [mysqld] port=3306 basedir="C:/Program Files/MySQL/MySQL Server 5.5/" datadir="C:/ProgramData/MySQL/MySQL S