| | |
How to increase stack size for apache users (web users)
![]() |
•
•
Join Date: May 2006
Posts: 12
Reputation:
Solved Threads: 0
In devoloping CGI scripts, I noticed that my apache server set stack size as 10MB for apache users. However, my cgi script needs to invoke a C executable that requires a larger stack size. I wonder how to increase the stack size for apache users.
I tried the following 2 approaches:
(1) to modify the /etc/security/limits.conf" file to increase all users' stack size by adding
"* soft stack unlimited"
and
"* hard stack unlimited".
(2) to modify the httpd.conf by adding "ThreadStackSize 65536*1024" (64MB should be big enough).
However, apache users still had 10MB stack size (this information was obtained via "ulimit -a") after two modifications.
BTW, I am using redhat enterprise linux in my server.
I tried the following 2 approaches:
(1) to modify the /etc/security/limits.conf" file to increase all users' stack size by adding
"* soft stack unlimited"
and
"* hard stack unlimited".
(2) to modify the httpd.conf by adding "ThreadStackSize 65536*1024" (64MB should be big enough).
However, apache users still had 10MB stack size (this information was obtained via "ulimit -a") after two modifications.
BTW, I am using redhat enterprise linux in my server.
•
•
Join Date: May 2006
Posts: 12
Reputation:
Solved Threads: 0
I believe that the "ThreadStackSize" directive can be used to increase the stack size for "apache" users. However, in order to make this directive effective, the "worker" MPM has to be used. Since only one core MPM can be activated at a time, how should I change my MPM from "prefork" (the default MPM in my server) to "worker"?
That's what I have done:
I made the binary of "/etc/sysconfig/httpd" point to "/usr/sbin/httpd.worker". Then, I restarted the httpd service ("service httpd restart") but got the following error information:
------------------------------------------------------------------------
[root@poplar sysconfig]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Wed Oct 25 12:39:22 2006] [crit] Apache is running a
threaded MPM, but your PHP Module is not compiled to be threadsafe. You
need to recompile PHP.
Pre-configuration failed [FAILED]
-------------------------------------------------------------------------
It seems that this thread-based model, 'worker', does not work with PHP modules.
What should I do then?
That's what I have done:
I made the binary of "/etc/sysconfig/httpd" point to "/usr/sbin/httpd.worker". Then, I restarted the httpd service ("service httpd restart") but got the following error information:
------------------------------------------------------------------------
[root@poplar sysconfig]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Wed Oct 25 12:39:22 2006] [crit] Apache is running a
threaded MPM, but your PHP Module is not compiled to be threadsafe. You
need to recompile PHP.
Pre-configuration failed [FAILED]
-------------------------------------------------------------------------
It seems that this thread-based model, 'worker', does not work with PHP modules.
What should I do then?
![]() |
Similar Threads
- database problem (C#)
- Google Adsense! (HTML and CSS)
- A subtle python cgi problem (Python)
- Inviting beta users for web app (Growing an Online Community)
- Review for Search Studio Inc - Web Design (Website Reviews)
- Unmetered Web space for Reseller Web Hosting from WebHostingWith.us (Web Hosting Deals)
- Receive Windows Messenger Messages and Alerts on your Mobile Device (Windows tips 'n' tweaks)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: No Redirection to my Apache Server
- Next Thread: Someone help me whith .httpaccess...
| Thread Tools | Search this Thread |
.net apache asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen xmas





