Drupal6.4 crashes regularly after embedding G2.3rc

Wimn

Joined: 2008-09-26
Posts: 13
Posted: Fri, 2008-09-26 08:30

Hi,

I've got a problem. I created a working D6.4/G2.3rc combination. But after a while drupal crashes, especially the the drupal-database. When I repair the drupal-database in mysql the site works again. The gallery-database remains unaffected. Any tips, trucs to solve this problem? Any suggestions concerning conflicting modules? I disabled the G2Image-component.

Have this comment in my gallery settings, tab "general"

Quote:
Gallery settings

* Install
* General
* Filter
* Zoeken

* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.
* warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.

Status

* Overall Status (Installation): [OK]
* Gallery2 API version: 7.54 / 1.4

A code snippet from menu.inc: from line 369 and on:

Quote:
function _menu_load_objects(&$item, &$map) {
if ($load_functions = $item['load_functions']) {
// If someone calls this function twice, then unserialize will fail.
if ($load_functions_unserialized = unserialize($load_functions)) {
$load_functions = $load_functions_unserialized;
}
$path_map = $map;
foreach ($load_functions as $index => $function) {
if ($function) {
$value = isset($path_map[$index]) ? $path_map[$index] : '';
if (is_array($function)) {
// Set up arguments for the load function. These were pulled from
// 'load arguments' in the hook_menu() entry, but they need
// some processing. In this case the $function is the key to the
// load_function array, and the value is the list of arguments.
list($function, $args) = each($function);
$load_functions[$index] = $function;

// Some arguments are placeholders for dynamic items to process.
foreach ($args as $i => $arg) {
if ($arg === '%index') {
// Pass on argument index to the load function, so multiple
// occurances of the same placeholder can be identified.
$args[$i] = $index;
}
if ($arg === '%map') {
// Pass on menu map by reference. The accepting function must
// also declare this as a reference if it wants to modify
// the map.
$args[$i] = &$map;
}
if (is_int($arg)) {
$args[$i] = isset($path_map[$arg]) ? $path_map[$arg] : '';
}
}
array_unshift($args, $value);
$return = call_user_func_array($function, $args);
}
else {
$return = $function($value);
}
// If callback returned an error or there is no callback, trigger 404.
if ($return === FALSE) {
$item['access'] = FALSE;
$map = FALSE;
return FALSE;
}
$map[$index] = $return;
}
}
$item['load_functions'] = $load_functions;
}
return TRUE;
}

Below system info

Quote:
Gallery versie = 2.3-RC1 core 1.2.36
API = Core 7.54, Module 3.9, Thema 2.6, Embed 1.4
PHP versie = 5.2.4-2ubuntu5.3 apache2handler
Web server = Apache
Database = mysqli 5.0.51a-3ubuntu5.1, lock.system=flock
Toolkits = Gd, jpegtran, ImageMagick, Ffmpeg
Versnelling = none, none
Besturingssysteem = Linux webserver 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686
Standaard thema = matrix
gettext = geactiveerd
Talen = nl_NL
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2
Rijen in GalleryAccessMap tabel = 3
Rijen in GalleryAccessSubscriberMap tabel = 2441
Rijen in GalleryUser tabel = 3
Rijen in GalleryItem tabel = 2441
Rijen in GalleryAlbumItem tabel = 26
Rijen in GalleryCacheMap tabel = 0

Server: P3 866 512mb SDRAM

D6/G2-site: http://80.127.72.196/drupal/gallery

Thanx in advance!

Wim

 
djpumpkin

Joined: 2006-12-06
Posts: 135
Posted: Sat, 2008-09-27 15:07

I just visited your site. It seems to work fine - very fast to load as well.

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Sat, 2008-09-27 18:41

Hi djpumpkin,

I notice also that the site hasn't crashed yet since friday. I removed the modules "date" and "calender", they seem to conflict. I consider it wise not to overcrowd the drupal-constellation. The more modules, the more chance of crashes. I did some maintenance on gallery and on drupal (databases) and it seems to hold thusfar... It's Drupal that crashes and never Gallery. Maintainance and optimizing both drupal and gallery seems important, (databases, caches etc.)

Thanx for your feedback!

Wim

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Sun, 2008-09-28 10:40

Disabling the G2Image-component of the Gallery-module might be of importance. The gallery-module is still in beta.

 
steinmb01
steinmb01's picture

Joined: 2005-04-07
Posts: 31
Posted: Sun, 2008-09-28 13:14

Did you run the date module and date API module at the same time? In PHP 5.x this seems to generate some WSOD on my site. Removed the date module and everything was stable again. This was on D5.x and Gallery 2.2.xx to my config is a bit different...

--
Steinmb

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Mon, 2008-09-29 07:04

I guess so, yes. Probably I removed more than necessary, but a running photoalbum is more important than bells and whistles. The last I did was to disable G2Image and optimizing databases both in gallery and drupal.

I still have the anoying "status HTTP-request"-problem (in Drupal), but that is not the cause of this problem.

Since friday my drupal-gallery combi didn't crash, almost too good to be trough:-)

Wim

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Tue, 2008-09-30 07:01

It still works, do not change a winning team:-) At the moment the emphasis of this site lies with the fotoalbum, the development of the website will follow later.

But I'm still not sure what did the trick. So any ideas are still welcome. I hope my experience helped others too! Let me know!

Wim

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Wed, 2008-10-01 08:08

Unlucky my d6.4/g2.3rc crashed again after a week. Ik didn't do the maintenance after the last upload batch.

The following tables in the drupal database were marked "crashed":

- accesslog
- cache
- watchdog

This is what should be done imho after each uploaded batch:

Maintenance in gallery:

- optimize database
- clear chache database and templates
- rebuild photos and miniatures

Maintenance in drupal:

- check databases, if appropriate repair
- optimize databases

I appreciate any comment on my findings!

Wim

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Fri, 2008-10-03 19:03

Mmm, drupal crashed again. Maybe another conflicting module, any ideas? I think I'll run G2 as standalone for a while:-(

 
steinmb01
steinmb01's picture

Joined: 2005-04-07
Posts: 31
Posted: Sun, 2008-10-05 03:27

2.3-RC2 is now out, have you tried running RC2? Could not find a changelog on the webpage on what changed between RC1 and RC2. Looks like this is going to be the last RC to I'll have to upgrade a test-instl. and see if I'm able to beat some bug out of it :)

Quote:
after each uploaded batch

What do you mean with whis?
Is it still the same error messages: warning: Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376.

Cheers
Steinmb

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Mon, 2008-10-06 08:14

Hallo Steinmb,

I meant the cleaning-up procedure after uploading a batch of photos. I still don't know why drupal crashes, even after the thoroughly cleaning-up.

And yes, apart from this: the "Invalid argument supplied for foreach() in /var/www/drupal/includes/menu.inc on line 376"error message still persist. But I don't think that is the real problem.

I found this node on the forum and I'm going to look into it:

http://gallery.menalto.com/node/81530

Maybe there is the clue

Installing G2.3 rc2 maybe helpful too, I'm going to do it anyway. Here is the info about the rc2:

http://gallery.menalto.com/gallery_2.3_RC2_released

Greetings,

Wim

Update 5 october 2008 13.22::

My gallery seems fuctioning again without any action from me? Haha, the server seems to be solving it's crashes all by itself? Well, I'll look into it tomorrow at work! Going to upgrade to rc2 I think.

Wim

Update 06 october: update rc2 went smoothfully, now busy with the other issues.

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Thu, 2008-10-09 18:23

Well,

I decided to remove the drupal/gallery to a faster (local) server. A terrible operation, I don't recommend it, better rent some space on a webhoster! Had numerous configuration problems to solve! Everything is finally back online now, upgraded the software to Drupal 6.5 and Gallery2 rc2 in the meanwhile. I would encourage you to visit my site and test it!

D6/G2-site: http://80.127.72.196/drupal/gallery

CPU Pentium4 2,66 Ghz / memory 2 Gb
OS Ubuntu-linux

The one problem that remains is:

The restored Information_schema in mysql-databases directory gives errors when using the check command. It seems repairing isn't possible. As far as I can see it doesn't affect the working of the site.

Wim

UPDATE 9 october 20.00:

After some struggling it's working now I hope:-) Thanx to the info on this forum from Jjoves, Steinmb and others!

I never thought it would be such a crime, a really steap learning curve for someone like me, not really an expert in linux! The Drupal has worked flawlessly ever, the Gallery too. It was the connection between these two that made it hard.

The site loads faster now the hardware (server) is better, I experience. I let it run for a while without doing much about it for a while, see how it goes.

What did the trick? Maybe this, one of the last settings I changed (in Gallery admin):

I changed:

URL Rewrite embeddedLocation /drupal/
embeddedHtaccess /var/www/drupal/gallery2/

in:

URL Rewrite embeddedLocation /drupal/
embeddedHtaccess /var/www/drupal/

and I disabled the gallery menu in the gallery-module (but I still see gallery menu-items in drupal?!?)

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Tue, 2008-10-14 09:33

Update 14 october 2008:

Uploaded several batches of photos. Did the following right after uploding:

Maintenance in Gallery:

- optimize database
- clear chache database and templates
- rebuild photos and miniatures

Maintenance in Drupal:

- check databases, if appropriate repair
- optimize databases

Though the embedded Gallery runs from within Drupal, I'm not completely satisfied. Rebuilding the images caused my server to crash! After restarting the server the problem was fixed (the rebuilding had taken place!), maybe I should change the maintenance protocol.

Since both Drupal and Gallery perform flawlessy as standalone applications, I incline to think the Gallery module still causes problems. Problems which may depend on the hardware and OS used. Considering the Gallery module is still in beta, though thusfar the developers did a good job, it needs more stability for use in a production environment.

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Mon, 2008-10-27 16:44

Update 27 october:

After installing G2.3 final in Drupal 6.6 the site has become much faster!

Wim

 
steinmb01
steinmb01's picture

Joined: 2005-04-07
Posts: 31
Posted: Mon, 2008-10-27 22:01

Wow that is good news! :) Do you find 2.3 final to be faster then the last RC? I done some speed tests towards http://80.127.72.196/drupal/gallery [i]I guess your gallery is still located there. I find the performance "feeling" good.

Empty Cache on http://80.127.72.196/drupal/gallery/v/diversen/omgeving
14.7K 1 HTML/Text
44.5K 5 JavaScript Files
53.1K 4 Stylesheet Files
4.5K 9 CSS Images
102.7K 16 Images
219.8K Total size
35 HTTP requests

I did the tests with http://developer.yahoo.com/yslow/ from New Zealand.

 
Wimn

Joined: 2008-09-26
Posts: 13
Posted: Wed, 2008-10-29 15:53

Steinmb01,

Thanks for your feedback from the other side of the world! The site seems to be stable and running smoothly now on drupal6.6/gallery2.3! The only (small) problem left is the time between calling the server and the website showing up, sometimes it takes up to 10 sec. It has something to do with the http-requests, I'm looking in to it. The site is on a local server, not at a webhoster, so its takes more time securing linux, backups etc. I've got much space on the other hand.

Wim