logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: FastCGI with APC
Author
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Fri 29 Jul '11 15:02    Post subject: FastCGI with APC Reply with quote

I'm having troubles getting APC working with FastCGI.

I have Apache set up with FastCGI and it is working correctly. When I add APC, I get strange errors. Images don't load on pages, and I get errors like this:

[Thu Jul 28 13:15:29 2011] [warn] [client x.x.x.x] (OS 109)The pipe has been ended. : mod_fcgid: get overlap result error, referer:
[Thu Jul 28 13:15:29 2011] [error] [client x.x.x.x] Premature end of script headers: minify.php, referer:

I'm using the same APC config settings that I used when I was running PHP as an Apache module:

extension="php_apc.dll"
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 128M
apc.max_file_size = 10M
apc.stat=1

I am now using the NTS version of PHP and APC.

Any ideas?
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Fri 29 Jul '11 15:53    Post subject: Reply with quote

Use Wincache is better and design for windows
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Fri 29 Jul '11 16:00    Post subject: Reply with quote

I am using Wincache now...but I figured APC was better since Wincache was designed for IIS.

Are they any special settings required to set up Wincache? With it running, I see lots of:

[Thu Jul 28 14:40:07 2011] [warn] mod_fcgid: process 2676 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:40:07 2011] [warn] mod_fcgid: process 2824 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:40:07 2011] [warn] mod_fcgid: process 3840 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:58:25 2011] [warn] mod_fcgid: process 1440 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:58:25 2011] [warn] mod_fcgid: process 732 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:58:25 2011] [warn] mod_fcgid: process 2756 graceful kill fail, sending SIGKILL
[Thu Jul 28 14:58:25 2011] [warn] mod_fcgid: process 3044 graceful kill fail, sending SIGKILL

Then I check the Wincache script and it reports that the opcode cache has reset and the uptime resets as well.
Back to top
Kanashii



Joined: 17 Jul 2006
Posts: 155
Location: Porando

PostPosted: Sat 30 Jul '11 2:01    Post subject: Reply with quote

Apache and fcgid is designed to kill process every eq default 1000 hint so you lost cache evry 1000 request unless

I use wincache for a about ~year

This is my cfg:

MaxRequestsPerProcess 50000000
FcgidMaxRequestsPerProcess 5000000000

ProcessLifeTime 0
FcgidProcessLifeTime 0
FcgidMinProcessesPerClass 0

FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000000

FcgidMaxProcesses 400

IdleScanInterval 900000000000
Back to top
Smitty



Joined: 03 Jan 2008
Posts: 197

PostPosted: Fri 05 Aug '11 3:40    Post subject: Reply with quote

Kanashii,

Thank you for the settings, they work great!
Back to top


Reply to topic   Topic: FastCGI with APC View previous topic :: View next topic
Post new topic   Forum Index -> Other Software