[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Is it normal for minivend to spawn several processes? (a BSD issue?)
****** message to minivend-users from jojo@buchonline.net ******
On 17 May, Mark Stosberg wrote:
> ****** message to minivend-users from Mark Stosberg <mark@summersault.com> ******
>
> Christopher Thompson wrote:
>>
>> I noticed seeing multiple copies of minivend and the CGI script in my
>> process table during a DOS type attack recently. I had to take the catalog
>> offline until I blocked the IP address because it would gradually fill up
>> the process table with minivend and the CGI script processes (FreeBSD).
>> The catalog does not use frames (I noted you mentioned that). Is what
>> happens when the system gets overwhelmed with minivend requests?
>>
>
> In my case, there was only one request, and minivend created 4 copies of
> itself totally more than 60 megs. Something about having relatively low
> memory on the machine may haver initiated a problem, but creating 4
> processes for one request didn't seem appropriate to me (regardless).
> I'm speaking here without knowing the internals of minivend (or what
> might be practical), but perhaps this was a case where threading may
> have been more appropriate than forking?
> I'm just wondering aloud here. I have only a vague idea of how to
> program threads in perl, and probably don't understand a number of
> important issues involved here.
My testing to understand the codes of Server.pm results some cases:
(Depend what your setting of houskeeping, maxserver and PIDcheck is!)
1. First starting of Minivend with PID number = 1 (for example)
2. Starting new Minivend Server with PID 2
3. Exit the Server with PID 1
4. cat error.log
---------snipp------------
server:/home/minivend[jojo]# cat error.log
- - - [18/Mai/2000:10:30:37 +0200] - - Low traffic settings.
- - - [18/Mai/2000:10:30:38 +0200] - - MiniMate is NOT active.
- - - [18/Mai/2000:10:30:38 +0200] - - MiniVend V4.04
- - - [18/Mai/2000:10:30:40 +0200] - - Config 'simple' at server startup
- - - [18/Mai/2000:10:30:41 +0200] - - START server (1) (UNIX)
- - - [18/Mai/2000:10:30:42 +0200] - - START server (2) (UNIX)
server:/home/minivend[jojo]#
---------snipp------------
5. top -Uminivend -d1
---------snipp------------
CPU states: % user, % nice, % system, % interrupt, % idle
Mem: 69M Active, 78M Inact, 16M Wired, 6686K Buf, 87M Free
Swap: 261M Total, 261M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
2 minivend 2 0 13212K 2940K select 0:00 0.00% 0.00% perl
---------snipp------------
This will stay in this list with PID 2 always.
6. If maxserver > 0, housekeeping> 0 and PIDcheck > 0
Every request start an new Minivend server with a new PID number and the
new Server exit, if the request is finish.
Every starting of a new server create a pidfile in minivendroot/etc like
pid3
pid4
pid5
etc.
and will be removed by exiting the new server (link/unlink pidfile).
7. If the setting of maxserver,housekeeping and PIDcheck is very wrong
(for example with very slow machine or very little RAM), there are more
Minivend server running (looking into the process list via top).
8. If Minivend Server was crashing, there are still some pidfiles in
minivendroot/etc. Starting the minivend server after any crashing.
Minivend will detect this pidfiles and clean this away. In this case,
you will get any messages about that in your error.log
9. If you use Frames and Framesets, in some case the one request _is_
not the real one request, if more than one frames is loading a page
from the minivend server at the same times. For example:
a) One page with a frameset for 2 or more frames
b) frame1 has a navigations bar and will be updated after each clicking
(onClick)
c) frame2 is the target
d) frame2 load a new frameset with frame3 and frame4 often
e) any click in frame1 start a new MV server
f) if frame2 load a frameset a new another MV Server is starting and
you can see more MV server for one request
Look for more better description about the MV starting by Bill Randle
(mail archivs).
I hope, this can you helps a little bit.
Joachim
--
Hans-Joachim Leidinger
buch online jojo@buchonline.net
Munscheidstr. 14 FAX: +49 209 1671449
45886 Gelsenkirchen FAX: 0209 1671449
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list