Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

issues with a running instance after postgresql restart #465

Open
kaos opened this Issue · 4 comments

3 participants

@kaos
Owner

This is with a somewhat older 0.8.? version.

I'll investigate this and see if it still applies.

Might be related to #55.

Some notes to self:

startade om postgresql ett par ggr, zotonic funkade efter endel omstarter men vid ett tillfälle hade jag skrivit fel i en config fil så att postgres inte startade alls, sen när jag fixat felet och startat postgres hade zotonic tappat kontakten med postgres.

@kaos kaos was assigned
@mmzeeman
Owner

This is still an issue.

When postgres is restarted, eg. after an upgrade, zotonic can't recover and all sites die.

I looks like restarting goes to fast and hits the restart limit.

2015-06-13 06:40:21 =ERROR REPORT====
** Generic server 'z_pivot_rsc$mmzeemanwww' terminating
** Last message in was {'$gen_cast',poll}
** When Server state == {state,{context,mmzeemanwww,undefined,undefined,undefined,undefined,undefined,undefined,undefined,'z_depcache$mmzeemanwww','z_notifier$mmzeemanwww','z_session_manager$mmzeemanwww','z_dispatcher$mmzeemanwww','z_template$mmzeemanwww','z_scomp$mmzeemanwww','z_dropbox$mmzeemanwww','z_pivot_rsc$mmzeemanwww','z_module_indexer$mmzeemanwww',155743,undefined,{'z_db_pool$mmzeemanwww',z_db_pgsql},en,<<"UTC">>,undefined,undefined,[],[],[],[],[],[],[],[]},{ok,{interval,#Ref<0.0.0.1889>}}}
** Reason for termination ==
@
    links: [<0.274.0>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 27
    reductions: 559
  neighbours:
2015-06-13 06:40:21 =SUPERVISOR REPORT====
     Supervisor: {<0.274.0>,z_site_sup}
     Context:    start_error
     Reason:     {'EXIT',{{{badmatch,{error,econnrefused}},[{pgsql_sock,command,2,[{file,"src/pgsql_sock.erl"},{line,163}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]},{gen_server,call,[<0.1762.77>,{connect,"127.0.0.1","mmzeeman","dimws-1234",[{database,"mmzeemanwww"},{port,5432}]},infinity]}}}
     Offender:   [{pid,undefined},{name,z_installer},{mfargs,{z_installer,start_link,[[{admin_password,"dimws-1234"},{dbdatabase,"mmzeemanwww"},{dbhost,"127.0.0.1"},{dbpassword,"************"},{dbport,5432},{dbschema,"public"},{dbuser,"mmzeeman"},{enabled,true},{host,mmzeemanwww},{hostalias,["www.mmzeeman.nl","inventheon.xs4all.nl"]},{hostname,"mmzeeman.nl"},{pagelen,5},{redirect,true},{sign_key,<<"xhEnUfA0EPSMZkem9aMmybt8qbt9eQMqS8yNf8tL">>},{sign_key_simple,<<"4h41QoyAAz">>},{subtitle,<<"My personal website">>},{title,<<"MMZeeman.nl">>}]]}},{restart_type,permanent},{shutdown,1},{child_type,worker}]
@mworrell
Owner

I have seen this in production. I am a bit confused why the system would give a econnrefused, which seems to be a low level connection error.

@mmzeeman
Owner
@mworrell
Owner

That could well be. One option I was thinking about is a kind of pre-flight check, where we test the database connection. This could also result in a better error message.

@mworrell mworrell added defect and removed pending reply labels
@mworrell mworrell added this to the Release 1.0 milestone
@kaos kaos was unassigned by mworrell
@mworrell mworrell self-assigned this
@mworrell mworrell added the core label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.