Ruby on Rails: Memory Allocation

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
I'm posting here because after hours and hours of research, I still haven't gotten anywhere. It would be a shame if I didn't figure this out and I'm really hoping someone that's familiar with how cPanel is setting up the RoR apps can shed some light on this. With a RoR app deployed, when image manipulation is being done using rmagick, we get -

libgomp: Thread creation failed: Cannot allocate memory

I'm assuming somehow CPanel is limiting the amount of memory the app can take up. Anyone has any clues?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
I'm posting here because after hours and hours of research, I still haven't gotten anywhere. It would be a shame if I didn't figure this out and I'm really hoping someone that's familiar with how cPanel is setting up the RoR apps can shed some light on this. With a RoR app deployed, when image manipulation is being done using rmagick, we get -

libgomp: Thread creation failed: Cannot allocate memory

I'm assuming somehow CPanel is limiting the amount of memory the app can take up. Anyone has any clues?
Do you have Shell Fork Bomb protection (in WHM -> Security -> Security Center) enabled?
 

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
Nope thats the first thing I checked actually had issues with that.

Something I noticed is that as root, it doesn't happen so its definitely a memory restriction on a regular user.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
10
313
Houston, TX
cPanel Access Level
Root Administrator
Nope thats the first thing I checked actually had issues with that.

Something I noticed is that as root, it doesn't happen so its definitely a memory restriction on a regular user.
I know the compilers tweak can adversely affect RoR apps as well. Try disabling that and see if this issue persists.
 

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
David,

Thanks for taking another crack at it. Compilers are not enabled on our servers either.

EDIT: I meant, compilers tweak. The compilers are available for all users.
 

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
Done: 466142

Thank you David. You guys would surprise me 10 times over if you actually figure this out.
 

Arvand

Well-Known Member
Jul 26, 2003
128
1
168
I wish I had it documented but I'm running a pretty big blank on how this was resolved. We did however experience it when trying to use lovdbyless -

How to install LovdByLess in a cPanel Account | Arvixe Blog

Outlines some changes that were made to RMagick. I would look at that as I believe this was coming up when uploading an image and when RMagick was being called. So it had something to do with the Rmagick/Imagemagick installation.
 

cbtrussell

Member
Nov 30, 2008
5
0
51
Awesome, thanks for the reply. That will give us something to adjust until we can figure out what's going on with Imagemagick.