Solved

FastCGI Error - timeout

Posted on 2013-01-22
4
910 Views
Last Modified: 2013-03-29
Hi, all!

Have a PHP routine that generates emails using SwiftMailer.  It works fine until I try to add large attachments, or a number of smaller attachments, that total around 3 meg.  Then it times out with a FastCGI error.  Here is the error:

FastCGI Error
The FastCGI Handler was unable to process the request.
________________________________________
Error Details:
•      The FastCGI process exceeded configured activity timeout
•      Error Number: 258 (0x80070102).
•      Error Description: The wait operation timed out.
HTTP Error 500 - Server Error.
Internet Information Services (IIS)


I searched here and found an accepted solution (a link to MS Solutions Center) which says to edit the fcgiext.ini file, but I've done searches on the server and they did not locate that file.  Where is it supposed to be?

One more time, just for posterity, can someone detail for me and others using Experts Exchange just exactly what needs to be done on the server (in PHP, MySQL and/or other server files) to prevent timeouts.  Would be very helpful if normal file locations were included.

Also, should I try to use PHP code on the page to adjust the timeout for these time-consuming operations then change it back or just set it at whatever the max time I think it may require and leave it there.  

We have a dedicated server, so my web host will do just about anything we want.  I just need to be able to tell them what, specifically, they need to do.

If you need more info (php.ini, other settings) just let me know.

Thanks!
Bruce
0
Comment
Question by:springthorpeSoftware
  • 2
4 Comments
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 38806429
0
 
LVL 11

Accepted Solution

by:
mcnute earned 500 total points
ID: 38809767
you'll have to augment the timeout option of your php cgi settings in php.ini. If the file is large, it takes more time to be attached to the email and if it takes longer than the timeout value in your php.ini file the server will stop the operation and give an 500 error.

This php documentation explains where to make the php cgi settings for iis, too:
http://php.net/manual/de/install.windows.iis7.php


Or the timeout value is specified somewhere in your iis settings like so:

<system.webServer>
  <fastCgi>
    <application fullPath="C:\php\php-cgi.exe" activityTimeout="600">
      <environmentVariables>
      </environmentVariables>
    </application>
  </fastCgi>
</system.webServer> 

Open in new window


Make the activityTimeout value bigger to avoid timeout errors on email attachments.
0
 

Author Comment

by:springthorpeSoftware
ID: 38829531
Roads_Roads & McNute:
Thanks for replying!  Was pulled off of this project last week to do something else, but am back on now.  Have sent to host.  Should hear back shortly.
Bruce
0
 

Author Closing Comment

by:springthorpeSoftware
ID: 39033180
Sorry to be so long closing this one.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now