Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

FastCGI Error - timeout

Posted on 2013-01-22
4
Medium Priority
?
930 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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

705 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