Skip to content

Terminated process/502 on syscall timeouts #651

@oprypkhantc

Description

@oprypkhantc
  • Octane Version: 1.4.2
  • Laravel Version: 9.52.4
  • PHP Version: 8.1.9
  • Server & Version: Swoole 5.0.1

Description:

When a request is timed out due to a syscall (curl, for example), response is not returned, causing a 502. Worst of all, master process gets restarted for whatever reason, causing a downtime before Octane restarts.

The exit code is 139 (segfault), meaning it is a bug in Swoole allowing Octane to do something wrong. Yet, it's very likely Octane is doing something wrong here, given it's relation to max_execution_time.

Steps To Reproduce:

Set max_execution_time in config/octane.php to 5; add this route:

Route::get('test', function () {
	Http::timeout(40)->connectTimeout(40)->get('https://hub.dummyapis.com/delay?seconds=10');
});

start Octane and navigate to your_domain/test. You will get a 502 if you're using a reverse proxy, or just a cut-off response if you're hitting Octane directly. You'll also see that the Octane process has terminated with an exit code of 139.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions