Weird socket issue with multiple services running #31
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-warlock#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
So I've been chasing down a problem with Warlock services. I have a production system that runs for about a day or 3 and then starts having socket issues (broken pipe). It is supposed to bomb out with exitcode 4 if that happens, but it is not. I know why and that is because as a service the
Service
class is supposed so catch the exception and exit, but I think theProcess::send()
is being called from somewhere else so I don't know where it's being called from to catch the exception.Step 1 will be to add a tracelog to where it internally catches the exception and sends the debug message. From there I should be able to trace where it is calling the function and either fix permanently or at least catch the exception so it can
exit(4)
and restart.The weird part of this, is that on Windows when closing the server, the services will not exit correctly if there is more than one running at the time. If there is only one service, exit is working.
With multiple services I get:
changed the description
changed the description
I think I may have fixed this in the last few commits. Basically, the reason the exception was not being caught was because PHP changed the way it handles certain errors in PHP7. The end result being that
Exception
is not the base class we want to use in ourcatch()
structures. This is because there is now a new "exception" type calledError
which is used to handle these previously "non-catchable errors". BothException
andError
now use a common base class calledThrowable
so for our "catchall" we need to usecatch(\Throwable)
instead. This fixed the service exit on an error exception.The socket issues may be because of buffer problems which have also now hopefully been fixed.
closed
mentioned in issue #24