# Invalid Response From an Upstream Server

**URL:** <https://www.ruby-forum.com/t/invalid-response-from-an-upstream-server/151175>\
**Category:** Rails\
**Created:** [October 17, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/invalid-response-from-an-upstream-server/151175 "2008-10-17T18:23:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [October 17, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/invalid-response-from-an-upstream-server/151175/1 "2008-10-17T18:23:24Z")

</div>

I have put together a Rails form-mailing application using Action  
Mailer and deployed it in a variety of instances without any problem.  
In my latest attempted deployment, however, I find that submitting the  
form results in the following error:

The proxy server received an invalid response from an upstream server.  
The proxy server could not handle the request POST /formtool/  
mail\_form.

Reason: Error reading from remote server

I am running Apache 2.2.3 with a Mongrel cluster. It seems that the  
submission spawns an additional mongrel instance.

Strangely, the problem just disappeared on its own for a while and now  
it has returned.

Has anyone else encountered this; and, more importantly does anyone  
know what I can do about it?

Thanks.

```
  ... doug
```

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [October 18, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/invalid-response-from-an-upstream-server/151175/2 "2008-10-18T14:11:14Z")

</div>

I think that it may be due to your current isp not adding a PTR record  
for your deployment server in its name resolution servers. The mail  
server will have trouble with reverse proxy lookup if this record is  
either not entered or is incorrect. I do not know the exact details  
of how it should be entered. You may want to work with the server  
admin for your site.  
Bharat

---

<div class="post-metadata">

**Author:** ![doug](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/dbc845/32.png) [@doug](https://www.ruby-forum.com/u/doug)\
**Post date:** [October 18, 2008, 6:05pm UTC](https://www.ruby-forum.com/t/invalid-response-from-an-upstream-server/151175/3 "2008-10-18T18:05:45Z")

</div>

Thanks for the response.

I really don’t understand why there isn’t more info available on this  
particular problem. Perhaps it is because (for whatever reason) it  
occurs so infrequently. As I said, I have quite a few deployments  
that are working just fine. It’s just this one that has a problem;  
and, for the life of me, I don’t know what really causes it.

However, I was finally able to Google what appears to be the  
solution. The commentator acknowledged the problem and said that it  
was an Apache issue that was fixed in version 2.2.4. Upgrading my  
version of Apache from 2.2.3 to 2.2.8 on the particular deployment  
that was experiencing the problem seems to have resolved the issue.  
Based on that, I conclude that this particular commentator knew what  
he was talking about. Accordingly, I would suggest that if anyone  
else experiences this problem and they are using a version of Apache  
earlier than 2.2.4, they should upgrade to at least 2.2.4.

Thanks for the input.

```
      ... doug
```
