I don't understand why, but my Drupal messages won't disappear, they just get "added" to each other. Someone has posted a similar problem on drupal.org: "warning/error messages won't disappear", but no solution has been posted yet. There's another one which is almost the same: Drupal messages won't go away.

Here's an example of the problem: Drupal messages

I do have the Administration menu installed, but the problem didn't occur earlier, so I don't think this is the source of the problem.
I've already cleared cache, ran update.php, ran cron, so I'm out of ideas.

I recently installed Ubercart module, but I don't know if it has anything to do with my problem.
But there's another one which I also don't understand: if I try to open a page which doesn't exist, I don't just get a "Page not found" error, but many MySQL errors too, which looks like this: (1) (2). It's really unhealthy too... Maybe there's a connection between these problems.

Any ideas?


  • 2
    Have you checked your Drupal and server logs to see if you have any errors caused by your site? Sep 16, 2011 at 15:11
  • Also, people commenting in issues listed by you suggest using Admin Menu's "Wipe & rebuild" option - have you tried that? Sep 16, 2011 at 15:13
  • 1
    maybe are related maybe not. IMHO, I suggest review the logs of errors of your webserver/php/database, logs of Drupal, enable Devel module features to see query logs to see delays, also disable redirections, ... all possible options to get more/most/best feedback from your issue. Also, if is possible, move your site to a test enviroment to test/crash without problems.
    – cigotete
    Sep 16, 2011 at 15:32
  • @Maciej Zgadzaj : yes, I have checked Drupal log, but found nothing "interesting" in it (there are some "access denied", "page not found", update and cron messages, "Login attempt failed for...", etc., so nothing specific). I can't check the server log, because it's on a webhosting site (the server is not ours). And yes, I've already tried using "Wipe and Rebuild", but nothing changed.
    – Sk8erPeter
    Sep 16, 2011 at 17:05
  • @moon.watcher: I checked the logs (see my previous comment too) and have Devel module enabled. If I click on "Session viewer", I can see that $_SESSION['messages']['status'] stays uncleared, that's why it always outputs those messages. I don't understand why it doesn't get deleted when it echoes them. Maybe I could try to put the system in a new environment, but it did work fine earlier, and I don't think that it's a server-side problem (but I will try to test it on my local webserver). Do you have any other ideas? Thanks!
    – Sk8erPeter
    Sep 16, 2011 at 17:16

1 Answer 1


Messages are kept in the user's session, which by default is stored in a database table called 'sessions'. If your database server dies partway through the page request, the messages may not get cleared from the session.

You can see the MySQL server failing when updating the sessions table in this image due to a max_allowed_packet error.

1M is a very small max_allowed_packet for a Drupal installation. You may need to ask your host to increase this limit. Alternatively, you could turn off dblog and use syslog instead, which sends your Drupal logs to a system daemon - but this may require your host to set up a syslog location for you.

There may be a module that implements hook_watchdog() that can save logs to a standard file. I can't find one, but if one exists, that could be a good option in your situation too.

  • Thanks, moving the site's content to an own server, where not a so ridiculously small 1M max_allowed_packet is set, solved the problem. :)
    – Sk8erPeter
    Oct 22, 2011 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.