On Theme creation, Resource Limit Reached, Error 508

Post

Posted
Rating:
#6934 (In Topic #1845)
Avatar
Standard member
Terry is in the usergroup ‘Fan in action’

Not a big deal because this stuff has to be sorted out anyway, but, Houston, we have a problem. I'll post the screenshot. I assume the site will come back up after a while, or 24 hours, but it crashed when attempting to create a new Theme. I based it on a previous Theme (the default theme). Also, it was a dark Theme I was creating. After clicking the go button, it hung, spinning. I loaded the site on my cell phone and it said the resources were depleted. It makes me think that there's something looping forever. It also makes me think I need a dedicated server. Updates to follow.

Attempted to SSH to the shell and got there. ps x says no resources available. Telnet, same. cPanel does show some pid's, but trying to lill then (kill -9 blahblah) says the pid is not valid. So, something is looping now for over 40 minutes, creating new processes, then they die off, and more are created.

I found a clue that wrap.cgi may be involved. It lives in .system/fcgid/wrap.cgi
Because it was protected, I backed out and renamed the folder it is in. That started to slow the problem down. So it's something to do with wrap.cgi when creating a new theme. After a while, because of the renaming of the file path, the processes all died off and I gained access to SSH. Screenshot attached at the end. No idea what's causing it. I'm going to rename wrap.cgi path back to normal to see if the site becomes available. – time passed.. it did not fix the issie… as soon as I renamed the wrap.cgi path back, the processes started back up. I presume because people are trying to access the site, and somehow the theme creation broke something. I'm not sure. I'll try to go through mysql to change the theme.

… time …

When I change the pathway to wrap.cgi, I can access adminzone, but only for a minute, because the "processes" that kill the site are allowed to be created when wrap.cgi has a correct path. I managed to change the theme back to the one I created long ago. The site became stable, but a bit of custom theming was lost. In terminal, this is found:

/opt/alt/php72/usr/bin/php-cgi -d memory_limit=1G

I don't know if that process belings there or not. I do know that when there are too many of those, the site crashes. This seems to happen when the theme is anything except the one I created long ago.

I don't know the role of wrap.cgi and why it blows the site up with any theme other than the one I have always used.

Site is stable now, but weird theme stuff going on because I lost some custom adds, but that's okay.

Now that the site is updated, and the file integrity looks very good, I want to be able to create different themes. That's the next goal.

Any ideas or insight into the errors tonight appreciated

































































 

Last edit: by Terry

Online now: No Back to the top

Post

Posted
Rating:
#6936
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ergh. Can you screenshot all the paginations from the Resource Usage? i.e. to see the full processlist.

I can see a lot of Apache instances, but it would be interesting to see what else is running.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#6939
Avatar
Standard member
Terry is in the usergroup ‘Fan in action’
Yeppers. I'll look at it tonight, but it might have to wait until my next day off to get some good data. I'll also pull up a fresh list of file differences between what *should* be there and what's actually there. Maybe something slipped through from an old version. More likely, this has nothing to do with Composr and everything to do with a conflict between gd (or whatever) and this cgi script. Who knows. More research to come. Thanks Chris!

 
Online now: No Back to the top

Post

Posted
Rating:
#6944
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
I looked into this more last night and there is one thing that the Theme Wizard might call other programs for, basically working around a GD bug handling 8-bit images it may call by using ImageMagick.
ImageMagick is the 'convert' command on the server. If somehow that command is not ImageMagick, but instead some other program that doesn't exit, it would cause an issue.
That seems unlikely, I checked Linux distributions and on no distribution is it anything other than ImageMagick.
Never-the-less, there could be some custom script on servers with that name causing an issue, and we should cater for that situation.
Here is a hot-fix:
0004326: ImageMagick should be configurable - Composr CMS feature tracker
It makes the path to ImageMagick configurable. You can also blank it out to disable it completely.
This probably is not your issue, but if it is you'll see 'convert' in the process list.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#6961
Avatar
Standard member
Terry is in the usergroup ‘Fan in action’
7-28-2020 2:22am

hotfix-4326, 2020-07-24 2am.tar installed

I have 2 days off work, starting right now. I will try to sort out the issue here.

The patch is installed. I will take a ps uax screenshot to show the ps BEFORE the attempt to create a new theme.
ps uax is (from what I know) the best way to show as much detail as possible, excluding the ISP's limit on the 'ps' shell command.
This is a normal condition. I'll be bac k in the morning to get down to the nitty gritty.













*edit* 2:45pm
Changing themes to a known theme works with no issues.

Time to create a new one…

*edit* 2:50

Creating a new theme. at step 2 of 4. Here's the ps uax












After Step 2 of 4, the ps is normal again. So far, this is probably normal behavior.

 Step 3 of 4 is fine
Step 4 of 4 does the work. ps shows a lot of activity, same basically as the avove screenshot. Almost 3 to 5 minutes after the theme is successfully created, the ps is starting to settle down. There seems to be a lot of tasks that are either not completed, or left to time out on their own. It seems to mean that Composr is done with the request to the shell, but she tasks are either not finished, or may never finish, or are being shared by other resources so that they will just take a long time (not likely).
* this test was creating a new theme from the DEFAULT theme! *

Now I'll create a new theme using a theme I edited on my own (this might be where the issue is is born..?)

*edit* 3:33

I have created several new themes from dark and light, HSV and Equations, and also based on several previous themes and DEFAULT. The issue is resolved. After any of these actions, ps is very active for a few minutes, then the CPU on each process slowly died down to zero, then leaves the ps list. I believe the patch was the solution. Issue resolved. Thanks Chris!

 
 

Last edit: by Terry

Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

amit.nigam, ManojSree, Salman, mytracker, Philip, gabriel58

Forum statistics:
  • 1,291 topics, 5,825 posts, 7,050 members
  • Our newest member is shop1
Birthdays:
Back to Top