Solved

FastCGI Error - timeout

Posted on 2013-01-22
4
917 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
clicking to find my folders on wamp 8 47
How can I stuff the results of this for loop into an array? 3 42
Horizontal Full Calendar using php 5 43
PHP processing webform 25 45
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…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

751 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