Hi Onno,
 
The errors only seem to occur in development mode, and disappear in
production mode (which I suppose makes sense given the latter should be
more stable). We're in the process of moving into a production
environment, and so very keen to determine the full extent of setting
this cacheing variable to true. Is the only real effect to us as
developers that the server will need to be restarted when any changes or
updates are made to the wiki?
 
If anyone has any idea as to exactly why the cacheing variable being
true stops the MySQL errors, I would truly love to know! I'm happy we
seem to be able to remove the error, but knowing the why would be ideal.
 
Thanks again for your continued help.
 
Matt
 
 

________________________________

From: epf-dev-boun...@eclipse.org [mailto:epf-dev-boun...@eclipse.org]
On Behalf Of Onno van der Straaten
Sent: 19 May 2011 20:46
To: Eclipse Process Framework Project Developers List
Subject: Re: [epf-dev] MySQL errors in EPFWiki


Hi Matt,
This variable is default set to false in development.rb so that you can
see code changes in the running application without a web server
restart. If you access the application only configuration file is used:
development, test or production.rb.

This lost connection problem is of course a bit tricky and unpredictable
and I don't have an explanation why this seems to have an effect.

The error message is btw not in the log files of http://epf.eclipse.org
but for that I can offer an explanation. I suspect the problem is caused
by the session management and few users login on http://epf.eclipse.org.
So almost all the content of that site is served directly from cached
pages and page fragments. I think I can provide a fix for this issue but
first I have to be able to reproduce this in my environment.

In what mode are you running the application when this problem occurs?
If are only using the application and not changing it, you should run in
production mode. That has the best settings for a production
environment. If you are on Linux you can specify the environment using a
environment variable RAILS_ENV for example with
export RAILS_ENV=production
But if the variable is not set, it is set to production in
environment.rb which has the line
ENV['RAILS_ENV'] ||= 'production' 

Best Regards,
Onno



On Thu, May 19, 2011 at 3:57 PM, Matthew Austin
<matthew.aus...@detica.com> wrote:


        Hi Onno,
         
        Thanks for your reply. After a little more testing and rooting
around, I discovered that these errors no longer presented themselves
after turning config.cache_classes to true in config/environments/*.rb. 
         
        Do you have any information on exactly what difference this
variable makes when it is turned on, and perhaps the other cacheing
variable in that file? I understand it's to do with whether or not you
need to restart the web server for changes to take effect, but I have to
admit to being rather stuck on the details.
         
        Thanks again
        Matt
         
         

________________________________

        From: epf-dev-boun...@eclipse.org
[mailto:epf-dev-boun...@eclipse.org] On Behalf Of Onno van der Straaten
        Sent: 18 May 2011 13:01
        To: Eclipse Process Framework Project Developers List
        Subject: Re: [epf-dev] MySQL errors in EPFWiki
        
        
        Hi Matthew,
        This is the second time this lost connection issue is reported
on this list, see
http://dev.eclipse.org/mhonarc/lists/epf-dev/msg03701.html. 
        I am going to check the logs of http://epf.eclipse.org
<http://epf.eclipse.org/>  to see if I can find out more. I will report
back my findings.
        Best Regards,
        Onno
         


         
        On Wed, May 18, 2011 at 12:36 PM, Matthew Austin
<matthew.aus...@detica.com> wrote:
        


                Hello, 

                We're having some seemingly random but persistent errors
on our wiki, and wonder if this has been experienced by anyone else, and
maybe if there's a fix.

                Our database is being hosted on a MySQL server, and we
are using LDAP rather than basic authentication. 

                We often get errors that look like the following: 

                Mysql::Error: Lost connection to MySQL server during
query: SHOW FIELDS FROM `pages` 

                These often arise when clicking on the Home tab, or
clicking the browser's back button to get back to the Home tab. They are
sometimes exhibiting themselves as 500 Internal Server Errors. They
don't always pertain to the same database field, and they don't appear
all the time, just sporadically.

                I've attached the last number of lines from the log file
to show a typical error, and the backtrace from the auto-generated email
is below.

                Is this purely a database issue? Any help or advice is
appreciated! 

                Matt Austin 

                <<500error.txt>> 

                Error report from Wed May 18 10:07:56 +0000 2011 
                Message Mysql::Error: Lost connection to MySQL server
during query: SHOW FIELDS FROM `pages`   
                Location        http://10.35.1.105:3005/portal/home
<http://10.35.1.105:3005/portal/home>     
                Action  home   
                Controller      portal 
                Query          
                Method  GET    
                SSL     false  
                Agent   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13     
                Backtrace 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/connection_adapters/abstract_adapter.rb:150:in `log' 

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/connection_adapters/mysql_adapter.rb:281:in `execute'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/connection_adapters/mysql_adapter.rb:411:in `columns'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/base.rb:1080:in `columns' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/base.rb:1088:in `columns_hash' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/attribute_methods.rb:63:in `define_attribute_methods'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/attribute_methods.rb:187:in `method_missing' 
                /app/models/wiki_page.rb:153:in `current_version' 
                /app/models/site.rb:82:in `templates' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/associations/association_proxy.rb:125:in `each'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/associations/association_proxy.rb:125:in `send'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/associations/association_proxy.rb:125:in `method_missing'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/associations/association_collection.rb:162:in `method_missing'

                /app/models/site.rb:81:in `templates' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_supp
ort/core_ext/object/misc.rb:28:in `returning' 
                /app/models/site.rb:80:in `templates' 
                /app/controllers/portal_controller.rb:33:in `home' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/base.rb:1158:in `send' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/base.rb:1158:in `perform_action_without_filters'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/filters.rb:697:in `call_filters' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/filters.rb:689:in `perform_action_without_benchmark'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/benchmarking.rb:68:in `perform_action_without_rescue'

                /apps/epfwiki/lib/ruby/1.8/benchmark.rb:293:in `measure'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/benchmarking.rb:68:in `perform_action_without_rescue'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/rescue.rb:199:in `perform_action_without_caching'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/caching.rb:678:in `perform_action' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/connection_adapters/abstract/query_cache.rb:33:in `cache'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_recor
d/query_cache.rb:8:in `cache' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/caching.rb:677:in `perform_action' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/base.rb:524:in `send' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/base.rb:524:in `process_without_filters' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/filters.rb:685:in `process_without_session_management_support'

        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/session_management.rb:123:in `process' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/base.rb:388:in `process' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/dispatcher.rb:171:in `handle_request' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/dispatcher.rb:115:in `dispatch' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/dispatcher.rb:126:in `dispatch_cgi' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_control
ler/dispatcher.rb:9:in `dispatch' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:1
12:in `handle_dispatch' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:7
8:in `service' 
                /apps/epfwiki/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service' 
                /apps/epfwiki/lib/ruby/1.8/webrick/httpserver.rb:65:in
`run' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:173:in
`start_thread' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:162:in
`start' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:162:in
`start_thread' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:95:in
`start' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:92:in
`each' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:92:in
`start' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:37:in
`start' 
                /apps/epfwiki/lib/ruby/1.8/webrick/server.rb:82:in
`start' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:6
2:in `dispatch' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/we
brick.rb:66 
        
/apps/epfwiki/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require' 
        
/apps/epfwiki/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_supp
ort/dependencies.rb:496:in `require' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_supp
ort/dependencies.rb:342:in `new_constants_in' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_supp
ort/dependencies.rb:496:in `require' 
        
/apps/epfwiki/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39 
        
/apps/epfwiki/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require' 
        
/apps/epfwiki/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require' 
                script/server:3 

                Please consider the environment before printing this
email.
                
                This message should be regarded as confidential. If you
have received this email in error please notify the sender and destroy
it immediately.
                Statements of intent shall only become binding when
confirmed in hard copy by an authorised signatory.  The contents of this
email may relate to dealings with other companies within the Detica
Limited group of companies.
                
                Detica Limited is registered in England under No:
1337451.
                
                Registered offices: Surrey Research Park, Guildford,
Surrey, GU2 7YP, England.
                

                _______________________________________________
                epf-dev mailing list
                epf-dev@eclipse.org
                https://dev.eclipse.org/mailman/listinfo/epf-dev
                
                


        Please consider the environment before printing this email.
        
        This message should be regarded as confidential. If you have
received this email in error please notify the sender and destroy it
immediately.
        Statements of intent shall only become binding when confirmed in
hard copy by an authorised signatory.  The contents of this email may
relate to dealings with other companies within the Detica Limited group
of companies.
        
        Detica Limited is registered in England under No: 1337451.
        
        Registered offices: Surrey Research Park, Guildford, Surrey, GU2
7YP, England.
        

        _______________________________________________
        epf-dev mailing list
        epf-dev@eclipse.org
        https://dev.eclipse.org/mailman/listinfo/epf-dev
        
        



Please consider the environment before printing this email.

This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory.  The contents of this email may relate to dealings 
with other companies within the Detica Limited group of companies.

Detica Limited is registered in England under No: 1337451.

Registered offices: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.

_______________________________________________
epf-dev mailing list
epf-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/epf-dev

Reply via email to