Redmine Internal server error, postgres-pr
Added by Andrey Kartashov almost 14 years ago
Hello,
I have recently started to use redmine. It is installed on fedora core, nginx with passenger, database is stored in postgresql 9.
After some days after installation, login page started to show internal server error. In production.log I see:
/!\ FAILSAFE /!\ Mon Feb 21 15:41:27 +0200 2011 Status: 500 Internal Server Error Broken pipe /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:112:in `write' /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:112:in `<<' /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.6.3/lib/postgres-pr/connection.rb:112:in `query' /usr/lib/ruby/gems/1.8/gems/postgres-pr-0.6.3/lib/postgres-pr/postgres-compat.rb:33:in `query' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/postgresql_adapter.rb:226:in `active?' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `verify!' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:256:in `checkout_and_verify' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:252:in `checkout_existing_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call' /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/head.rb:9:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lock.rb:11:in `call' /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:106:in `call' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/utils.rb:479:in `safe_fork' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:180:in `start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `__send__' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server:99
To resolve the problem I had to restart nginx.
I am able to reproduce the problem by restarting postgresql.
Some details about my environment:
[root@nginx ~]# ruby -v ruby 1.8.6 (2010-09-02 patchlevel 420) [x86_64-linux] [root@nginx ~]# gem list --local *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.5) daemon_controller (0.2.6) facebooker (1.0.75) fastthread (1.0.7) file-tail (1.0.5) frankie (0.3.1) i18n (0.4.2) json_pure (1.4.6) passenger (3.0.2) postgres-pr (0.6.3) rack (1.1.0) rack-test (0.5.4) rails (2.3.5) rake (0.8.7) sinatra (1.0) spruz (0.2.5) tilt (1.1)
nginx-0.8.53-2.fc13.x86_64
postgresql90-server-9.0.1-3PGDG.f13.x86_64
Redmine version - 1.1.1 (2011-01-30), installed from SVN
Replies (4)
RE: Redmine Internal server error, postgres-pr - Added by Etienne Massip almost 14 years ago
You should try pg
adapter, postgres-pr
is not very up-to-date and has already some glitches with PG9, including bytea encoding.
RE: Redmine Internal server error, postgres-pr - Added by Andrey Kartashov almost 14 years ago
Thank you.
pg requires more recent ruby:
[root@nginx ~]# gem install pg
ERROR: Error installing pg:
pg requires Ruby version >= 1.8.7.
I have installed postgres gem:
postgres (0.7.9.2008.01.28)
How can I make sure redmine uses it? I have tried to remove postgres-pr, but it does not allow me to:
[root@nginx ~]# gem uninstall postgres-pg ERROR: While executing gem ... (Gem::InstallError) cannot uninstall, check `gem list -d postgres-pg` [root@nginx ~]# gem list -d postgres-pg *** LOCAL GEMS *** [root@nginx ~]#
RE: Redmine Internal server error, postgres-pr - Added by Etienne Massip almost 14 years ago
I've been running 0.10.0 version of pg with Rails 1.8.7 without any problems for about 6 months.
Redmine is compatible with ruby 1.8.7, can't you upgrade ?
Solved: gem install pg resolve problem RE: Redmine Internal server error, postgres-pr - Added by system admin0987 about 12 years ago
#gem uninstall postgres-pr
Successfully uninstalled postgres-pr-0.6.3
#yum install gcc
#gem install pg
i have same issue , But now after installing pg , when i restart my posgresql database then my redmine again connect smooth without restarting the nginx server.
great.!!!!!!!!