Re: A subprocess call fails, but only under Django

2014-03-11 Thread Shawn Milochik
On Tue, Mar 11, 2014 at 8:07 PM, Shawn Milochik wrote: > > I tried to circumvent the entire problem by adding an "if __name__ == > '__main__'" block to the script and having it take a command-line argument > via argparse and print the desired output. Then I did a >

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Shawn Milochik
Hi Russ, thanks for the reply. What I mean by "under Django" is if I call it from within a view or with "manage.py shell" I get the problem. On the system in question, "manage.py shell" does in fact invoke iPython. However, invoking iPython manually (without manage.py) works. Executing the script

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Russell Keith-Magee
On Wed, Mar 12, 2014 at 2:06 AM, Shawn Milochik wrote: > Hi everybody. I have a weird problem. I have a small script that does a > subprocess call. It works. It works when run via iPython. It blows up when > run in manage.py shell or under Django with OSError: [Errno 12]

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Shawn Milochik
On Tue, Mar 11, 2014 at 9:24 PM, Nick Santos wrote: > Hey Shawn, > > What does your web stack and environment look like? If it's failing during > a fork with an out of memory, that makes me wonder if the host process for > django is consuming a chunk of memory for some

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Shawn Milochik
On Tue, Mar 11, 2014 at 9:06 PM, Drew Ferguson wrote: > Hi > > Could your problem be some SELINUX issue? > > Perhaps disable SELINUX temporarily and see if the problem persists. > > How would selinux cause the problem to only happen under certain conditions? I don't

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Drew Ferguson
Hi Could your problem be some SELINUX issue? Perhaps disable SELINUX temporarily and see if the problem persists. On Tue, 11 Mar 2014 20:07:48 -0400 Shawn Milochik wrote: > Hi Russ, thanks for the reply. > > What I mean by "under Django" is if I call it from within a

Re: A subprocess call fails, but only under Django

2014-03-11 Thread Nick Santos
Hey Shawn, What does your web stack and environment look like? If it's failing during a fork with an out of memory, that makes me wonder if the host process for django is consuming a chunk of memory for some reason, and when it gets forked, it'll get replicated over (which supposedly would fail,

A subprocess call fails, but only under Django

2014-03-11 Thread Shawn Milochik
Hi everybody. I have a weird problem. I have a small script that does a subprocess call. It works. It works when run via iPython. It blows up when run in manage.py shell or under Django with OSError: [Errno 12] Cannot allocate memory. Does anyone have any idea on how to fix this? It's not