Solved

FastCGI Error - timeout

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

808 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