Search code examples
ruby-on-railsrubymacosrack-pow

POW, OS X - Proxy timeout - 502 error


I'm running POW on OSX to serve RoR apps for development. Somedays ago, one of my apps broke returning 502 error. Page seems to be loading till it's bumping into timeout showing this message:

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.html.

Reason: Error reading from remote server

502

I've checked logs and there are nothing - no Ruby code is execuded, so Rails are not even touched. I typed rails s in terminal and app is working without any issues.

Also I reverted by GIT my app to the stage before issue and even to very beginning and result is the same.

Other dev apps in *.dev domain are working fine.

Not sure where is the issue and where should I look for it. I would greatly appreciate any help.


Solution

  • It's resolved.

    I had to see logs in ~/Library/Logs/Pow/app/ and found Ruby bug. http://pow.cx/manual.html#section_2.6

    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING /Users/***/.rvm/gems/ruby-2.2.2/gems/json-1.8.3/lib/json/ext.rb:13:in `require'
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- Machine register context ------------------------------------------------
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING  rax: 0x0000000000000000 rbx: 0x00007fdfad2f4450 rcx: 0x0000000000000000
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING  rdx: 0x0000000000000000 rdi: 0x0000000000000000 rsi: 0x0000000000000025
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING  rbp: 0x00007fff57954310 rsp: 0x00007fff579542b0  r8: 0x0000000000000000
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING   r9: 0x00007fff71bb2110 r10: 0x00007fff98b8e401 r11: 0x00007fff8f847140
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING  r12: 0x0000000108d0ece0 r13: 0x0000000000000000 r14: 0x0000000000000025
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING  r15: 0x0000000000000000 rip: 0x0000000108d58886 rfl: 0x0000000000010202
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING -- C level backtrace information -------------------------------------------
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 0   libruby.2.2.0.dylib                 0x0000000108440655 rb_vm_bugreport + 149
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 1   libruby.2.2.0.dylib                 0x00000001082e82f2 rb_bug_context + 466
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 2   libruby.2.2.0.dylib                 0x00000001083bccf3 sigsegv + 83
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 3   libsystem_platform.dylib            0x00007fff841a352a _sigtramp + 26
    [Wed Feb 10 2016 01:46:33 GMT+0100 (CET)] WARNING 4   libruby.2.2.0.dylib                 0x0000000108d58886 newobj_of + 45
    

    I've downgraded Ruby 2.2.2 -> 2.2.1 and it works. So I bet that was it, question for me is why it was working fine when running rails s.