collapse

* User Info

 
 
Welcome, Guest. Please login or register.

* Recent Posts

Forum closed by whazzup
[September 25, 2021, 02:56:14 PM]


How do i replace an image file with another image file by Malu
[December 16, 2020, 03:17:02 PM]


Can't get RSG "Show My Galleries" to work by Dampfnudel
[February 25, 2019, 11:01:55 AM]


Change the order of uploaded images in the gallery by whazzup
[February 19, 2019, 10:37:29 PM]


Upload timeout for large galleries (500 images each) by whazzup
[February 11, 2019, 10:07:25 PM]


Greetings from Ronald Smit by whazzup
[January 06, 2019, 03:39:22 PM]


Pluign and module by whazzup
[June 08, 2018, 11:57:13 PM]


Version 4.4.1 released by whazzup
[May 31, 2018, 04:31:16 PM]

Author Topic: RSGallery Corruption Causes Unending Processes  (Read 3814 times)

Offline scene66

  • Newbie
  • *
  • Posts: 49
RSGallery Corruption Causes Unending Processes
« on: September 26, 2014, 07:13:39 AM »
Hi

Our site runs out of memory every few hours. Through WHMvps I can see that this is being caused by unending processes generated from RSGallery. I can kill the unending processes manually, but I need to fix the cause.

The TRACE PROCESS returns results like this:
poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout) write(3, "O\0\0\0\3SELECT id\nFROM gx8s3_rsgall"..., 83) = 83 read(3, "\1\0\0\1\1Y\0\0\2\3def\vsmydb_name_db\32gx8s3_"..., 16384) = 396 time(NULL)                              = 1411706604
But I don't understand what this means.

Using phpMyAdmin, I have tried searching the RS2Gallery tables for numbers that correspond with this code. I found an image ID match and deleted it, but the problem persists.

Should I re-install? I have trepidation over this as customisation will be lost — and I think I have some hacks as well, thanks to awesome support from this forum! But if it has to be done, so be it.

I have tried repairing RSG2 tables with phpMyAdmin.

Thank you in advance.

J25
3.2.0. SVN 1098
PHP version 5.3.27
MySQL version 5.1.73-cll

Offline scene66

  • Newbie
  • *
  • Posts: 49
Re: RSGallery Corruption Causes Unending Processes
« Reply #1 on: September 26, 2014, 11:47:40 PM »
UPDATE: I have two versions of Latest Galleries Module on the home page. If I turn off one in particular, the problem ceases, so safe to say the issue is limited to that module. I will delete that module, and recreate it. Hopefully that will resolve everything.

I should have mentioned in the first post that the TRACE PROCESS results keeps repeating, never ending.

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: RSGallery Corruption Causes Unending Processes
« Reply #2 on: October 03, 2014, 03:06:10 PM »
Hi there,

Since I have a little boy in the house I don't spend time on RSG2 anymore, he is just too much fun...

[...] thanks to awesome support from this forum! [...]
Sadly, those days seem to be over  :( . Whazzup is doing what he can right now, with a focus on getting RSG2 ready for J3 (which is a lot of work), there are just too few people interested in and able to work on RSG2... (no blame, just noticing it).

You are well on your way in problem solving, though.

On your problem though: I don't know this WHMvps you're talking about, but part of the line you wrote is
Code: [Select]
SELECT id\nFROM gx8s3_rsgall"..., 83) = 83
which is a statement selecting the item or gallery id from an rsgallery2 table in the database. I'd love to see what the "..." in this line says to be able to find out whether it is the item (e.g. image) or the gallery. There is only one php file in the mod_rsgallery2_latest_galleries package, the one: mod_rsgallery2_latest_galleries.php and not so many SELECT statements. Can you get more information on that line?

Is it always "83" in that line? In that case, just like you, I would suspect that entry and that image. However, you have already deleted that entry with the image... so I run out of options.

You already noted you found an ID match and deleted that. Was that an image? Is the watermarked image also deleted if you're using watermarks? Is there also an ID of 83 for the galleries? Does the #__menu table have an ID of 83 for the RSG2 menu item? (#__ is your database prefix).

Sadly, at the moment I don't know where (else) to look for a solution.

Note: You can always backup the two com_rsgallery2 directories in /JOOMLAROOT/ and /JOOMLAROOT/administrator/ and then reinstall. You can copy the files back when you want. However, if it is a module issue, I don't think that will help.

With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline scene66

  • Newbie
  • *
  • Posts: 49
Re: RSGallery Corruption Causes Unending Processes
« Reply #3 on: October 11, 2014, 07:15:45 AM »
WHM is part of cpanel. I saw it described as the channel of cpanel! http://cpanel.net/

I couldn't extrapolate the rest of the code hidden within "…" Sorry, not much help is it? No, it wasn't always "83" in the line you asked about. But when it did come across an error in a line, say 116, that line number would re-occur a few times after the process was deleted.

In any event, the deletion of that particular version of the module removed the error. When an identical module was recreated, we've remained trouble-free for a week, so I guess the module had corrupted somehow.

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: RSGallery Corruption Causes Unending Processes
« Reply #4 on: October 13, 2014, 02:48:18 PM »
I couldn't extrapolate the rest of the code hidden within "…" Sorry, not much help is it? No, it wasn't always "83" in the line you asked about. But when it did come across an error in a line, say 116, that line number would re-occur a few times after the process was deleted.

In any event, the deletion of that particular version of the module removed the error. When an identical module was recreated, we've remained trouble-free for a week, so I guess the module had corrupted somehow.
Fingers crossed it keeps that way ;-) and close the topic for now. If you get more errors, the notices with line numbers should be nice to have. Thanks for reporting back.
With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!

Offline scene66

  • Newbie
  • *
  • Posts: 49
Re: RSGallery Corruption Causes Unending Processes
« Reply #5 on: November 03, 2014, 03:05:45 AM »
Hi Whazzup and Mirjam

I regret the problem returned two weeks ago, but I am only just posting now.

The issue is definitely with the 'Latest Galleries' module. Turning off those module(s) kills the problem. This is a shame as this is a critical part to creating interest in the galleries from the homepage. The RS2galleries themselves have remained on the site and do not exhaust memory with non-ending processes.

I have attached a screenshot of a sample of the error. The blacked-out bar is our database name. Our host has confirmed that they are unable to see deeper into the report with a view to supplying me the whole line of code (which is truncated in the screenshot) — and that the code would need to be examined line by line.  :(

[Deleted on request]
« Last Edit: November 03, 2014, 02:52:10 PM by mirjam »

Offline mirjam

  • Retired from Dev Team
  • Hero Member
  • ****
  • Posts: 670
Re: RSGallery Corruption Causes Unending Processes
« Reply #6 on: November 03, 2014, 03:34:36 PM »
In the Latest Galleries module there is one PHP file where requests for the database are made, that is the mod_rsgallery2_latest_galleries.php file. The select statements queries there (and I go looking for them because it says "SELECT id\nFROM" in the image) are
a - id of items from the database where the menu item is one for RSGallery2 (around line 70-76)
b - id and parent of galleries to create a "tree" of the gallery structure (around line 111-115)
c - everything of all published galleries, depending on settings the list of galleries is limited (around line 151-167)

I can imagine that "b" takes quite some time to create a "tree" of galleries if there are a lot of galleries.

Could you give the settings of the module?
"Select galleries to show"
"Include subgalleries"
How many galleries would that be on your website?
Does it help to restrict the galleries to show to a subset (e.g. 2, 4, 6, 8, 10) with no subgalleries?

In your image you have number 84 and 116, do you have images and galleries with these numbers?  Or only images? Or only galleries? Or neither?

And upon another look:
There seems to be a line wrong in the file mentioned (/JOOMLAROOT/modules/mod_rsgallery2_latest_galleries/mod_rsgallery2_latest_galleries.php), see lines 129-131:
Code: [Select]
        foreach ($galleryarray as $gal) {
            $galleryselection =
            // Get list of galleries with (grand)children in the right order and with level info
Please comment the middle line to get

Code: [Select]
        foreach ($galleryarray as $gal) {
//            $galleryselection =
            // Get list of galleries with (grand)children in the right order and with level info
But I'd just expect a PHP error with this.

In short: I don't have a clue where to look  :( so let's find some more clues. Sorry...
With a little boy in the house I don't spend as much time on RSG2 anymore.

I still like RSG2, if you do too, please think about how you can invest some of your time in RSG2... the one remaining coding volunteer (Whazzup) can use your help!