Re: 501 user for wo apps?
Re: 501 user for wo apps?
- Subject: Re: 501 user for wo apps?
- From: Pascal Robert <email@hidden>
- Date: Tue, 12 Apr 2011 13:41:59 -0400
Le 2011-04-12 à 13:26, Jesse Tayler a écrit :
> I always forget I have to reply-all to include the list!
>
> On Apr 12, 2011, at 1:24 PM, Jesse Tayler wrote:
>
>> wait a second here Pascal -- you were able to launch 9 instances on a micro?
Yes, but don't forget that I didn't change the memory params, so they were using 32 MB each.
>> I can launch - ...one... - the second instance is rather unceremoniously killed.
>>
>> Sure enough, there's no swap and not a lot of memory -- how am I using so much more RAM than you?
>>
>> Unless I'm mistaken -- this says I have a whopping 9K of free memory -- I feel like a wild man on a DEC PDP-8 - single user mode!
It's in MB :-) So you have 93 MB, that's why you can't start a instance at 128 MB.
In my tests (did it for one of my WOWODC talks), the basic system with httpd, JavaMonitor and wotaskd will eat up 187 MB of memory while not accepting any requests. Add your first instance which use at least 128 MB and you should have 280 MB left if no requests are done. If your first instance is used and you have a database running on your instance, RAM goes down, etc.
Java memory settings reminds me of the "good old" Mac OS 9 days where we had to adjust manually how much RAM each app would use.
>>
>>
>>
>> ~]$ free
>> total used free shared buffers cached
>> Mem: 610196 600856 9340 0 696 9924
>> -/+ buffers/cache: 590236 19960
>> Swap: 0 0 0
>>
>>
>>
>>
>> On Apr 12, 2011, at 1:10 PM, Pascal Robert wrote:
>>
>>>
>>> Le 2011-04-11 à 16:03, Jesse Tayler a écrit :
>>>
>>>> Right, but now for some reason I'm running out of memory but I note monitor has increased memory settings? Or is this because I'm trying to use a "micro" instance of an amazon server?
>>>
>>> I got a "micro" instance to play with last week, and I was able to start 9 instances of AjaxExample from Wonder. The server was only running httpd, JavaMonitor, wotaskd and the instances. After 9 instances, wotaskd was still trying to launch the other 21 other instances (I wanted to see how the VM would react) over and over again.
>>>
>>>> the command line seems to run from the terminal, but I get this complaint in the WO app log:
>>>>
>>>>
>>>>
>>>> callUnixProcess [/home/appserver/bin/imagesize.sh 64 jpg]
>>>> java.io.IOException: Cannot run program "/home/appserver/bin/imagesize.sh": java.io.IOException: error=12, Cannot allocate memory
>>>
>>> Look like that error is when the system is out of memory. Run the "free" command to check how much memory is available:
>>>
>>> [probert@wocommunity ~]$ free
>>> total used free shared buffers cached
>>> Mem: 1574912 1564208 10704 0 22528 646312
>>>
>>> I did notice that a "micro" instance don't have any swap space, which is kind of bad. If you can live with a bit less of disk space, see :
>>>
>>> http://siva2009.wordpress.com/2009/06/18/adding-linux-swap-file-how-to/
>>>
>>> Maybe the other instances size have swap space by default, but I don't know.
>>>
>>>>
>>>>
>>>>
>>>> here's monitor settings, includes proper memory no? unrelated?
>>>>
>>>> -Xms128m -Xmx256m -DWOAllowsConcurrentRequestHandling=true
>>>>
>>>>
>>>> On Apr 11, 2011, at 2:59 PM, Pascal Robert wrote:
>>>>
>>>>>
>>>>> Le 2011-04-11 à 14:47, Jesse Tayler a écrit :
>>>>>
>>>>>>
>>>>>> I'm launching a UNIX script to generate image thumbnails and troubleshooting with a new server setup.
>>>>>>
>>>>>> Unless I'm mistaken, the script is unable to launch due to permissions and WO seems to be running user 501 without a username.
>>>>>>
>>>>>> Now I can't recall if that's how it used to be, should I be running uid 501 with no account/username?
>>>>>
>>>>> Normally, the user who run wotaskd and Monitor (and your apps) is "appserver". I guess that user is not on your new server, and that since no other user have a ID of 501, it's running on the ID of the user coming from the .tar.gz of wotaskd and Monitor.
>>>>>
>>>>> So, you should create a "appserver" user and use 501 as the id for this user (or create the user and do a "chown -R appserver" on the directory where WO and your apps are).
>>>>>
>>>>>> I don't want a security disaster, but I do need to launch some scripts that require a decent shell env.
>>>>>>
>>>>>> Advice?
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> Webobjects-dev mailing list (email@hidden)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden