Hi All, 

 

I like to implement the following in mod_fcgid:

 

-          An rlimit restriction for each process that have spawned of
mod_fcgid (a php binary)

 

I tried the following in arch/unix/fcgid_proc_unix.c on line 100

( on the end of the function ap_unix_create_privileged_process )

 

 

        struct rlimit reslim;

        reslim.rlim_cur = 40;

        reslim.rlim_max = 40;

        apr_procattr_limit_set(attr, APR_LIMIT_NPROC, &reslim);

 

    return apr_proc_create(newproc, newprogname, newargs, env, attr, p);

}

 

 

This sets the NPROC for my php processes to 40 (good :-) )

 

But my mod_fcgid gets errors after a few seconds, because (I think) itself
can only spawn 40 processes.

 

Is there a way to set rlimit only on the spawned process, and not on the
main process of fast_cgid itself ?

 

Regards,

Tom

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

Reply via email to