PHP has outgrown being a simple Apache module, being used on the command line not just for development tools but also in production. Long-running PHP processes may live for hours or days consuming messages from queues or background jobs to execute; this talk will guide you through several years of tweaks to make them reliable and performant. There are many things that can go wrong when leaving a PHP process around on your servers, but it is possible to solve the problems of crashing, memory leaks, interruptions, lost logs, or monitoring. The goal of having smooth operations has to be kept in mind - scaling your servers and traffic without scaling the people needed to look after them.

Comments

Comments are closed.

Good coverage of the basic important stuff one should know about running long processes in PHP. Well packed within the 20-min time-slot. I'd love to see that one in a 40-60 min session with live running (and stopping) examples.

Liam Wiltshire at 11:47 on 9 Jun 2017

Well presented, lots of info. Perhaps not taught me anything new, but good to validate what we are already doing.

This is an area I haven't had much experience in and I came away feeling that I've learnt useful information in a short time period and been presented with further resources to look into. Concise with nice explanations. Thanks!

Koen Eelen at 23:55 on 9 Jun 2017

For me it was a little bit too dry, i think such a complex subject would be better fitted for a longer type of talk.

Chris Sherry at 10:36 on 10 Jun 2017

Short but sweet lightning talk, but clearly described the considerations that are needed when using long running processes.

I think the real strength to this talk will be the examples that were linked in the slides to apply the practice to the theory discussed here.

Checking the memory to catch memory leaks was an excellent takeaway.

The talk didn't quite fill the time so I think there's space for a little more terminology explanation.

Sean Wallis at 12:41 on 10 Jun 2017

This was a new area for me, and I definitely picked up some things. I couldn't understand everything however and it did feel a little dry in some parts.

Katy Ereira at 20:17 on 10 Jun 2017

I think you got as much in as possible for a lightning talk, so appreciated. I've used some long running processes recently for things like chat bot development, but I hadn't really thought too much about it, so I came away with some good tips. Thanks!

Chris Emerson at 22:28 on 10 Jun 2017

Some great tips here for looking after long running processes, and I'll certainly be investigating some of the suggestions further. Some quick information on how to daemonize PHP scripts would be a good addition I think.

Gary Jones at 22:55 on 11 Jun 2017

Very well presented, covering a lot in the short timeslot. Definitely would like to have the slides available, as a starting point to code patterns.

Naomi Gotts at 19:26 on 12 Jun 2017

I suspect this talk could do with having a little more time to go into the discussion areas a bit more.

Giorgio Sironi (Speaker) at 18:19 on 24 Jun 2017

Thank you for the feedback, I plan to expand the talk to 45 minutes at the Dutch PHP Conference and this will be very helpful.

Giorgio Sironi (Speaker) at 18:20 on 24 Jun 2017

Also, slides are now available from this page in the links at the top.