I have a problem with my hosting "hostgator"

In my site i have a section for photos upload.
For manage it i use attachment_fu.
In the action of upload i do some simple query.

If the file to upload is smaller than 1mb there isnt any problem

but if it is bigger than 1 mb about i receive an error:

mysql error server has gone away.

i wrote to hostgator. they responsed me with:

All MySQL connections open for more than 15 seconds are killed off once
a minute.  Your script needs to be modified so the MySQL connection is
opened just prior to the query actually being run


How i can to open mysql connection only when i do query for this action?
thanks
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to