# PRoblem with Mongrel

**URL:** <https://www.ruby-forum.com/t/problem-with-mongrel/111619>\
**Category:** Rails\
**Created:** [August 9, 2007, 7:51am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619 "2007-08-09T07:51:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 9, 2007, 7:51am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619/1 "2007-08-09T07:51:34Z")

</div>

Hi,

I have a strange problem.  
I have a mongrel cluster and when i am trying to access my url, then it  
s failing 1 out of 10 times.  
Then we tried it by accessing the url by specifying the mongrel id and  
we found that from the series only one i.e. the first one was failing.  
The mongrel ids were from 10000 to 10003 and only the 10000 mongrel id  
wasnt respoding.  
Any suggestions?

Neha

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 9, 2007, 8:09am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619/2 "2007-08-09T08:09:08Z")

</div>

Look at the mongrel logs? How is it ‘failing’?

Vish

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 9, 2007, 8:13am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619/3 "2007-08-09T08:13:13Z")

</div>

We have a pdf-writer installed on that box and when we try to access  
that module then it says  
PDF is not a class/module.

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 9, 2007, 8:28am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619/4 "2007-08-09T08:28:11Z")

</div>

I assume all mongrels are on that box and it’s happening to this alone?

Try:

1. Force all the mongrels to exit. `ps ax | grep mongrel’ shouldn’t  
show anything alive. This mongrel could be a remnant.
2. Where do you load PDF::Writer? Try requiring it early, in  
environment.rb
3. PDF::Writer seems to have problems. Switch to an alternative?  
[http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs](http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs)
4. Google the exact error, it helps a lot.

Regards,  
Vish

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 9, 2007, 11:21am UTC](https://www.ruby-forum.com/t/problem-with-mongrel/111619/5 "2007-08-09T11:21:16Z")

</div>

Vishnu G. wrote:

> I assume all mongrels are on that box and it’s happening to this alone?
> 
> Try:
> 
> 1. Force all the mongrels to exit. `ps ax | grep mongrel’ shouldn’t  
> show anything alive. This mongrel could be a remnant.
> 2. Where do you load PDF::Writer? Try requiring it early, in  
> environment.rb
> 3. PDF::Writer seems to have problems. Switch to an alternative?  
> [http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs](http://wiki.rubyonrails.org/rails/pages/HowtoGeneratePDFs)
> 4. Google the exact error, it helps a lot.
> 
> Regards,  
> Vish

That was of gr8 help.  
We moved the require stmts to environment.rb and it’s working till now.  
Thanks for the help.
