Solved

FastCGI Error - timeout

Posted on 2013-01-22
4
901 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

759 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

25 Experts available now in Live!

Get 1:1 Help Now