Hi!
when I am working with CCK, creating/editing new content types, I often did error that allowed memory exhausted.
Is it normal? just click on editing new cck content type and fatal memory is shown (not always)
then I have to remove/delte about half of my modules and then site will start again. Until I delete modules there are
these warnings and errors.
I am really crazy from it. Can somebody help with it to me?
I have latest CCK modules

Many thanks
Igor
somvprahe.sk

Warning: Table 's' was not locked with LOCK TABLES query: SELECT s.lid, t.translation FROM locales_source s INNER JOIN locales_target t ON s.lid = t.lid WHERE s.source = '%message in %file on line %line.' AND t.locale = 'sk' in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'locales_source' was not locked with LOCK TABLES query: SELECT lid, source FROM locales_source WHERE source = '%message in %file on line %line.' in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'locales_source' was not locked with LOCK TABLES query: INSERT INTO locales_source (location, source) VALUES ('/', '%message in %file on line %line.') in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'locales_source' was not locked with LOCK TABLES query: SELECT lid FROM locales_source WHERE source = '%message in %file on line %line.' in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'locales_target' was not locked with LOCK TABLES query: INSERT INTO locales_target (lid, locale, translation) VALUES (0, 'sk', '') in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'cache' was not locked with LOCK TABLES query: DELETE FROM cache WHERE cid = 'locale:sk' in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Fatal error: Allowed memory size of 52428800 bytes exhausted (tried to allocate 3692222 bytes) in /home/somvprahe.sk/somvprahe.sk/www/includes/bootstrap.inc on line 588

Warning: Table 'sessions' was not locked with LOCK TABLES query: SELECT sid FROM sessions WHERE sid = 'lnpndp0ts1vc7mlheulje8b957' in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Warning: Table 'sessions' was not locked with LOCK TABLES query: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES ('lnpndp0ts1vc7mlheulje8b957', 19, 0, '84.42.134.21', '', 1184621605) in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

Comments

igorik’s picture

when I works with CCK without a half of my modules (40 modules left in sites/all/modules directory )
I got this warning after each CCK editing/creating

Warning: Got a packet bigger than 'max_allowed_packet' bytes query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Got a packet bigger than 'max_allowed_packet' bytes\nquery: UPDATE cache_views SET data = 'a:4:{s:6:\\"tables\\";a:139:{s:17:\\"nodefamily_parent\\";a:3:{s:4:\\"name\\";s:10:\\"nodefamily\\";s:4:\\"join\\";a:3:{s:4:\\"left\\";a:2:{s:5:\\"table\\";s:4:\\"node\\";s:5:\\"field\\";s:3:\\"nid\\";}s:5:\\"right\\";a:1:{s:5:\\"field\\";s:10:\\"parent_nid\\";}s:4:\\"type\\";s:5:\\"inner\\"; in /home/somvprahe.sk/somvprahe.sk/www/includes/database.mysql.inc on line 172

thanks for a help
Igor Krutak
www.somvprahe.sk

vm’s picture

LOCK TABLES is a DRUPAL system requirement see: System requirements

and I quote: (Pay attention to what's in bold below)

NOTE: Drupal makes use of some features not available on some inexpensive hosting plans so please check that your host allows database accounts with the following rights:
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES

Blank pages are apache errors, that would be caused by the fact that you are running out of memory on your server. 40 modules is quite a lot of modules to be running. Cut back on your modules or ask your host to increase the amount of memory available to you. Some hosts allow you to do this yourself by using a custom php.ini file and increasing the memory_limit line.

igorik’s picture

Hi
Thanks for your answer.
I asked my hosting provider and he told me that I have all privileges...
So it is weird... I don't know what can be problem.

Igor Krutak
www.somvprahe.sk

cog.rusty’s picture

Did he mean that you have all privileges in general, or that you have already applied them to this database and this database user?

igorik’s picture

He looked at right this db privileges, so he means that I have all privileges for this db.

Igor Krutak
www.somvprahe.sk

svogel’s picture

Hi igorik,

and the other error, which was not mentioned by the other is the max_allowed_packet-error.
In MySQL you have a setting to restrict the maximum amount of data to be written by an insert/update-statement. max_allowed_packet is usually around 1M.

Have a look at: http://drupal.org/node/75400 for more pointers on that problem.

Carpe diem
Stefan

cog.rusty’s picture

You have two kinds of error. The first one is: "Table xxxx was not locked with LOCK TABLES"

When you set up your database and your database user, the file INSTALL.mysql.txt included with Drupal says that you need to grant these privileges to the database user:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES

Either you didn't grant LOCK TABLES to your database user (and you need to go back to your cpanel and do it now) or your host does not allow it (and you will always have problems with Drupal).

The other one is the memory error: "Allowed memory size of 52428800 bytes exhausted"

Your php memory is now 52M and you need more. Generally you can increase it more (http://drupal.org/node/29268), although you are already rather high.