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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---