Hi,
I've been trying to solve this problem for over a week now.
I have a Drupal 6.19 company website, with 11 languages and over 1400 total links in the menu_links table. Whenever I try to add a link to primary links, Drupal starts to behave strangely: I cannot edit or add any nodes, with an error message "username admin does not exist" - But I have the admin user and I can login with it. If I then delete a menu item from primary links, everithing is back to normal. It seems somehow a limitation.
Here's what I already did:
* Rebuilt permissions, deleted cache, forced rebuild of navigation links * Checked menu_links table throughly, searching for ivalid items * Deleted some orphan menu items that had no parents * Corrected some menu items that were internal but somehow were flagged external in DB * Made a local copy of the site: the issue is the same * Updated Drupal 6.19 to 6.26 * Updated all modules to their latest version * Tried to disable ALL modules except menu module: issue persists until I disable menu module too * Checked that all items in menu_links appear in Drupal UI * Increased PHP memory limit from 128MB to 256MB
None of the above solved the problem. This issue only occurs with primary links. I can add menu items to secondary links without triggering this problem.
I searched the web for a solution, but all I can find was a similar problem with no answers. I posted this question in the Drupal forum, Stackexchange and Stackoverflow but nobody could solve this problem.
If there's anyone who can really help me with this, I'm gonna put him on a pedestal and worship his name...
Thanks in advance for any clues, Balazs
On Mon, Oct 8, 2012 at 4:52 AM, Karsai Balázs wrote:
Hi,
I've been trying to solve this problem for over a week now.
I have a Drupal 6.19 company website, with 11 languages and over 1400 total links in the menu_links table. Whenever I try to add a link to primary links, Drupal starts to behave strangely: I cannot edit or add any nodes, with an error message "username admin does not exist" - But I have the admin user and I can login with it. If I then delete a menu item from primary links, everithing is back to normal. It seems somehow a limitation.
Here's what I already did:
Rebuilt permissions, deleted cache, forced rebuild of navigation links Checked menu_links table throughly, searching for ivalid items Deleted some orphan menu items that had no parents Corrected some menu items that were internal but somehow were flagged external in DB Made a local copy of the site: the issue is the same Updated Drupal 6.19 to 6.26 Updated all modules to their latest version Tried to disable ALL modules except menu module: issue persists until I disable menu module too Checked that all items in menu_links appear in Drupal UI Increased PHP memory limit from 128MB to 256MB
None of the above solved the problem. This issue only occurs with primary links. I can add menu items to secondary links without triggering this problem.
You didn't mention reviewing the system log files for PHP and httpd. Also look at admin/reports/dblog to see if there is a relevant message.
I searched the web for a solution, but all I can find was a similar problem with no answers. I posted this question in the Drupal forum, Stackexchange and Stackoverflow but nobody could solve this problem.
If there's anyone who can really help me with this, I'm gonna put him on a pedestal and worship his name...
Have you tried different browsers to see if the effect is the same? I'm guessing you've overrun some environment related maximum of some sort and the differing browsers makes no difference but finding which one is going to be a pain. Maybe the overrun is the file size or column size depending on how you store sessions (file based versus db based).
Hi,
Thanks for your answer.
You didn't mention reviewing the system log files for PHP and httpd. Also look at admin/reports/dblog to see if there is a relevant message.
I don't have direct access to the server, but I'll try to get the logs and check them. On my test machine, I checked the logs. The only thing I found was these 404 errors:
[Mon Oct 08 10:09:47 2012] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/themes, referer: http://localhost/flavonmax/admin/build/menu/item/1964/delete
But this is because Drupal isn't in the root dir on my test server (on the production server, it is in the root). Besides, production server runs Windows Server 2008 with IIS, while the test server is Windows7 with Apache 2.2
Also tried /admin/reports, but I don't have dblog there, the only thing I can choose is status report.
I don't know where the PHP log files are.
Have you tried different browsers to see if the effect is the same? I'm guessing you've overrun some environment related maximum of some sort and the differing browsers makes no difference but finding which one is going to be a pain. Maybe the overrun is the file size or column size depending on how you store sessions (file based versus db based).
Yes, I tried on Firefox, Chrome, Opera and IE. My home PC runs Linux, I'll try on it, but I doubt that this is the problem.
Meawhile I updated PHP in hope this helps, but the issue is still there.
Can I safely empty the sessions table? I think that maybe that'll help...
Thanks, Balazs
On Tue, Oct 9, 2012 at 2:52 AM, Karsai Balázs wrote:
Hi,
Thanks for your answer.
You didn't mention reviewing the system log files for PHP and httpd. Also look at admin/reports/dblog to see if there is a relevant message.
I don't have direct access to the server, but I'll try to get the logs and check them. On my test machine, I checked the logs. The only thing I found was these 404 errors:
[Mon Oct 08 10:09:47 2012] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/themes, referer: http://localhost/flavonmax/admin/build/menu/item/1964/delete
Ugh, the spaces drive me crazy. What is your DocumentRoot here?
But this is because Drupal isn't in the root dir on my test server (on the production server, it is in the root).
Maybe setup a Virtual Host in apache. It is rather easy to do.
Besides, production server runs Windows Server 2008 with IIS, while the test server is Windows7 with Apache 2.2
So the production server and the test environment are different. Not the best situation but can be better if you have an end to end test system that contains IIS to deploy to before moving to production.
Also tried /admin/reports, but I don't have dblog there, the only thing I can choose is status report.
Check that you have "Database Logging" enabled at admin/build/modules.
I don't know where the PHP log files are.
IIRC there not enabled by default. You can modify the php.ini file to enable them or to find the location if they are already enabled.
Have you tried different browsers to see if the effect is the same? I'm guessing you've overrun some environment related maximum of some sort and the differing browsers makes no difference but finding which one is going to be a pain. Maybe the overrun is the file size or column size depending on how you store sessions (file based versus db based).
Yes, I tried on Firefox, Chrome, Opera and IE. My home PC runs Linux, I'll try on it, but I doubt that this is the problem.
Meawhile I updated PHP in hope this helps, but the issue is still there.
Can I safely empty the sessions table? I think that maybe that'll help...
Yes, you can empty the sessions table. It will log off all sessions.
2012.10.09. 14:02 keltezéssel, Earnie Boyd írta:
On Tue, Oct 9, 2012 at 2:52 AM, Karsai Balázs wrote:
I don't have direct access to the server, but I'll try to get the logs and check them. On my test machine, I checked the logs. The only thing I found was these 404 errors:
[Mon Oct 08 10:09:47 2012] [error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/themes, referer: http://localhost/flavonmax/admin/build/menu/item/1964/delete
Ugh, the spaces drive me crazy. What is your DocumentRoot here?
This is the test environment. Document root is
C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/
but the Drupal root is
C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/flavonmax
Check that you have "Database Logging" enabled at admin/build/modules.
I'll try it, but now I'm pretty much on the "let's reassemble the site on Drupal 7" side, because when the site was built 2 years ago, I was completely new to Drupal and as I only had 3 weeks to migrate from a custom made native PHP system to Drupal, I used some code (mostly in the theme) that's not too elegant. Most of this code is still there, because it's working, but It would be better to build a site that's totally coherent with Drupal's core.
Balazs
On Wed, Oct 10, 2012 at 2:56 AM, Karsai Balázs wrote:
I'll try it, but now I'm pretty much on the "let's reassemble the site on Drupal 7" side, because when the site was built 2 years ago, I was completely new to Drupal and as I only had 3 weeks to migrate from a custom made native PHP system to Drupal, I used some code (mostly in the theme) that's not too elegant. Most of this code is still there, because it's working, but It would be better to build a site that's totally coherent with Drupal's core.
If you're going from D6 to D7 be sure that all the modules are up-to-date in D6 first. Choose a D6 theme that doesn't contain the custom code. Then you can upgrade core and all the modules to D7, perform the update.php and then work on the customizations to the theme.
I assume you're hoping migrating to D7 will resolve the issue but you may still be overrunning a system buffer.
2012.10.09. 14:02 keltezéssel, Earnie Boyd írta:
Check that you have "Database Logging" enabled at admin/build/modules.
I enabled this module and added a menu item to see what happens. Now I get a lot of mysql errors when trying to edit a node (if I delete the menu item, everything is fine again).
I got about 120 of these kind of errors, all in *database.mysqli.inc* on line *128:
* *Warning*: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:1687470:"MySQL server has gone away\nquery: UPDATE cache_menu SET data = 'a:2:{s:4:\"tree\";a:76:{i:212;a:2:{s:4:\"link\";a:37:{s:14:\"load_functions\";N;s:16:\"to_arg_functions\";N;s:15:\"access_callback\";N;s:16:\"access_arguments\";N;s:13:\"page_callback\";N;s:14:\"page_arguments\";N;s:5:\"title\";N;s:14:\"title_callback\";N;s:15:\"title_arguments\";N;s:4:\"type\";N;s:11:\"description\";N;s:9:\"menu_name\& in C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs\includes\database.mysqli.inc on line 128
It looks like quite a lot of queries fail, but I don't know what to look for. Other than this, there are a bunch of errors in the log, regarding language javascript files that cannot be created, but they are there before and after inserting a menu link.
Any suggestions?
Balazs
On Wed, Oct 10, 2012 at 10:10 AM, Karsai Balázs wrote:
2012.10.09. 14:02 keltezéssel, Earnie Boyd írta:
Check that you have "Database Logging" enabled at admin/build/modules.
I enabled this module and added a menu item to see what happens. Now I get a lot of mysql errors when trying to edit a node (if I delete the menu item, everything is fine again).
I got about 120 of these kind of errors, all in database.mysqli.inc on line 128:
Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:"%error";s:12:"user warning";s:8:"%message";s:1687470:"MySQL server has gone away\nquery: UPDATE cache_menu SET data = 'a:2:{s:4:\"tree\";a:76:{i:212;a:2:{s:4:\"link\";a:37:{s:14:\"load_functions\";N;s:16:\"to_arg_functions\";N;s:15:\"access_callback\";N;s:16:\"access_arguments\";N;s:13:\"page_callback\";N;s:14:\"page_arguments\";N;s:5:\"title\";N;s:14:\"title_callback\";N;s:15:\"title_arguments\";N;s:4:\"type\";N;s:11:\"description\";N;s:9:\"menu_name\& in C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs\includes\database.mysqli.inc on line 128
The amount of data being set in cache_menu.data is larger than you MySQL configuration allows.
It looks like quite a lot of queries fail, but I don't know what to look for. Other than this, there are a bunch of errors in the log, regarding language javascript files that cannot be created, but they are there before and after inserting a menu link.
Any suggestions?
You'll need to adjust your MySQL server configuration.
2012.10.10. 18:51 keltezéssel, Earnie Boyd írta:
The amount of data being set in cache_menu.data is larger than you MySQL configuration allows.
It looks like quite a lot of queries fail, but I don't know what to look for. Other than this, there are a bunch of errors in the log, regarding language javascript files that cannot be created, but they are there before and after inserting a menu link.
Any suggestions?
You'll need to adjust your MySQL server configuration.
I searched the web for this and added a line in the mysql config on my test server:
max_allowed_packet = 16M
And voila: problem gone. Now I must tell the server admin to set this for me on the production server and hop it solves it too. Fingers crossed.
However, thank you for your help Earnie! Without you I'd be still searching for a solution.
Where do you want your pedestal to be erected? :D
Balazs
On Thu, Oct 11, 2012 at 4:40 AM, Karsai Balázs wrote:
Where do you want your pedestal to be erected? :D
It this list is fine. Just help the next person who needs help and you understand how it should be solved.