# Xojo CGI errors

**URL:** <https://forum.xojo.com/t/xojo-cgi-errors/15823>\
**Category:** Web\
**Created:** [April 17, 2014, 4:52pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823 "2014-04-17T16:52:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anthony\_Mott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@Anthony\_Mott](https://forum.xojo.com/u/Anthony_Mott)\
**Post date:** [April 17, 2014, 4:52pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/1 "2014-04-17T16:52:22Z")

</div>

I’m running my Xojo web application on a CentOS 32Bit server using Apache with the CGI method and it seems to work fine for the most part but occasionally when a user tries to connect they get “Oops! Page cannot be found” or something similar. If they refresh it usually loads the second time. When this happens I see either one or both of the following errors in my Apache logs:

[Thu Apr 17 11:40:17 2014] [error] [client xxx.xxx.xx.xxx] Script timed out before returning headers: closeout.cgi, referer: [http://mysite.com/cgi-bin/NewOrder/closeout.cgi](http://mysite.com/cgi-bin/NewOrder/closeout.cgi)

or

[Thu Apr 17 11:40:43 2014] [warn] [client xxx.xxx.xx.xxx] Timeout waiting for output from CGI script /var/www/cgi-bin/NewOrder/closeout.cgi, referer: [http://mysite.ccom/cgi-bin/NewOrder/closeout.cgi](http://mysite.ccom/cgi-bin/NewOrder/closeout.cgi)

Any idea what might be causing this?

---

<div class="post-metadata">

**Author:** ![Phillip\_Zedalis](https://forum.xojo.com/user_avatar/forum.xojo.com/phillip_zedalis/32/1151_2.png) [@Phillip\_Zedalis](https://forum.xojo.com/u/Phillip_Zedalis)\
**Post date:** [April 17, 2014, 8:36pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/2 "2014-04-17T20:36:26Z")

</div>

I’ve seen this before and I’ve never been able to pin down why it happens. However to resolve it I would SSH into the server and navigate to the folder holding the cgi. Then I would run “perl FILENAME.cgi” and basically you’ll see some HTML outputted. After that the app seems to work fine.

---

<div class="post-metadata">

**Author:** ![Anthony\_Mott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@Anthony\_Mott](https://forum.xojo.com/u/Anthony_Mott)\
**Post date:** [April 17, 2014, 9:06pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/3 "2014-04-17T21:06:46Z")

</div>

Hi Phillip.

I did try that and I did see the output as expected but I still get the errors.

---

<div class="post-metadata">

**Author:** ![Lee\_Page](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/91b2a8/32.png) [@Lee\_Page](https://forum.xojo.com/u/Lee_Page)\
**Post date:** [April 17, 2014, 10:39pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/4 "2014-04-17T22:39:08Z")

</div>

I had the same issue with a couple of Xojo database driven web applications. Changing/Tweaking the Apache CGI Timeout Directives did the trick for me. 🙂

---

<div class="post-metadata">

**Author:** ![Dan\_Harding](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/c37758/32.png) [@Dan\_Harding](https://forum.xojo.com/u/Dan_Harding)\
**Post date:** [May 20, 2014, 6:10pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/5 "2014-05-20T18:10:30Z")

</div>

Lee,

Can you tell me what directives and in what files you changed to eliminate the timeout?

---

<div class="post-metadata">

**Author:** ![Anthony\_Mott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@Anthony\_Mott](https://forum.xojo.com/u/Anthony_Mott)\
**Post date:** [May 21, 2014, 6:02pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/6 "2014-05-21T18:02:01Z")

</div>

I never did. I ended up recompiling the program to run as a standalone app rather than a CGI app. It’s not ideal but it seems to run more stable this way.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:11pm UTC](https://forum.xojo.com/t/xojo-cgi-errors/15823/7 "2020-10-29T17:11:04Z")

</div>


