Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Operation timed out' with POST requests and Caddy (Webserver) #49

Open
Bara opened this issue May 13, 2021 · 7 comments
Open

'Operation timed out' with POST requests and Caddy (Webserver) #49

Bara opened this issue May 13, 2021 · 7 comments

Comments

@Bara
Copy link

Bara commented May 13, 2021

I've some weird issue with RIPExt (1.2.3) and Caddy (2.3 and 2.4).

GET requests (as example) works fine, but when I've trying to use POST requests I always get 0 as response code with Operation timed out as error. Full error: HTTP Status Code: 0, Error: Operation timed out after 30015 milliseconds with 0 bytes received

What I tested:
nginx and Caddy as webservers in combination with php7.4 and php8.0 with/out JIT enabled. It works fine with nginx and any php versions, but caddy won't work. To confirm this, I rented another vserver by a different hoster and location. Same results.

My Caddyfile:

domain.tld {
    php_fastcgi unix//run/php/php8.0-fpm.sock

    root * /path/to/public/folder

    rewrite * /index.php?{query}

    encode zstd gzip
}

But(!) Caddy seems not the root cause, because POST requests works fine with Insomnia, but not with https://reqbin.com/.

So, reqbin and ripext in combination with caddy as webserver won't work. I'm still not sure where is the issue, but it seems related to curl.

@Kxnrl
Copy link
Contributor

Kxnrl commented May 23, 2021

if post and server return http 307, same timeout

@ErikMinekus
Copy link
Owner

Unless someone can share a Docker setup with Caddy and php-fpm, it will be difficult for me to debug, but if you tell me if your game server is running Linux or Windows, I can provide a debug build of ripext.

if post and server return http 307, same timeout

I can't reproduce this with a POST to https://httpbin.org/status/307 on a Linux game server. Do you have any more details?

@Bara
Copy link
Author

Bara commented Jun 5, 2021

Unless someone can share a Docker setup with Caddy and php-fpm

I'm not really familiar with Docker. 🤔

but if you tell me if your game server is running Linux or Windows, I can provide a debug build of ripext.

Generally I use Linux for gameservers.

@ErikMinekus
Copy link
Owner

ErikMinekus commented Jun 5, 2021

I got Caddy 2.4 and php-fpm 7.4 to run in Docker, but I am unable to reproduce the issue.

Here's a debug build based on ripext 1.3, which prints everything cURL does to the server console: rip.ext.so.zip

@Bara
Copy link
Author

Bara commented Jun 5, 2021

but I am unable to reproduce the issue.

Same it currently works (reqbin and extension), probably it was fixed with cURL 7.75 update ( 1ee4aa8 ).

But I'll still use the debug version, maybe the bug comes back.

@Bara
Copy link
Author

Bara commented Oct 25, 2021

Tested it today again and seems still happening and now with the debug build.

get response: https://hastebin.com/ugadesudog.yaml
post response (with error): https://hastebin.com/zokegifexo.yaml

It also freeze my caddy webserver and can't stop it with caddy stop.

Caddy Version: 2.4.5

@Kxnrl
Copy link
Contributor

Kxnrl commented Jan 17, 2022

got same bug with nginx 1.21.5 + rip 1.3.1 (windows)
if I turn off http2 on nginx, got client sent invalid chunked body error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants