Purchase Linux CDs / DVDs / Flash Drives at OSDisc.com

Welcome to Our Community

While Linux.org has been around for a while, we recently changed management and had to purge most of the content (including users). If you signed up before April 23rd, 2017 please sign up again. Thanks!

Centos7 kill process in two hours

Discussion in 'General Server' started by Mustafa SEVİNÇ, Mar 27, 2018.

  1. Mustafa SEVİNÇ

    Mustafa SEVİNÇ New Member

    Joined:
    Mar 27, 2018
    Messages:
    1
    Likes Received:
    0
    hi,I am starting golang websocket app from linux Centos7 but its stop in after one,two hours.But when i start at windows server it can't stop



    CentOS Linux release 7.4.1708 (Core)
    golang version go1.10 linux/amd64
    my websocket source code :: https://drive.google.com/open?id=1ul8ByiBNeudrycb_1U4FVdrGJJyIXgcT
     
  2. JasKinasis

    JasKinasis Well-Known Member

    Joined:
    Apr 25, 2017
    Messages:
    279
    Likes Received:
    531
    @Mustafa SEVİNÇ -

    So you are saying that your application works well on a Windows server, but it crashes after an hour or two on Linux? Is this correct?

    I'm not particularly au-fait with the go programming language.. I've only done a few tutorials on it. I certainly can't see any obvious errors in the code.

    Have you tried running the code through a debugger in Linux? I know that gdb support for go is somewhat limited, but I believe there are one or two other debuggers available for go. (can't remember the names offhand). But here's an article I just found with a quick bit of duckduckgo-fu:
    https://blog.cloudflare.com/go-has-a-debugger-and-its-awesome/

    If manually debugging is impractical - perhaps try adding some logging/tracing code to your program to try to help you to work out what is causing the abnormal termination of your program. That way, your program should build up a log of the actions it is performing.

    Leave it to run until it crashes, then take a look at the generated log-file and see if you can work out which part of the code caused the crash.

    When the program terminates abnormally - does it give any error messages in the terminal? or write any error messages to any system logs?
     

Share This Page