Skip to content
New issue

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

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

Already on GitHub? # to your account

/livejson schließt die TCP connection nicht. #83

Closed
gzi01 opened this issue Mar 20, 2023 · 3 comments
Closed

/livejson schließt die TCP connection nicht. #83

gzi01 opened this issue Mar 20, 2023 · 3 comments
Labels
wontfix This will not be worked on

Comments

@gzi01
Copy link

gzi01 commented Mar 20, 2023

Describe the bug
Bei auslesen des JSON via PHP entstehen Verzögerungen von 1 Minute bzw. bricht das Script mit timeout ab.

To Reproduce
Steps to reproduce the behavior in PHP :

   php -r ' $jsondata = file_get_contents("http://10.0.0.25/livejson"); echo $jsondata; '

(takes 60 seconds)

Work around (responds promptly):

   php -r ' $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://10.0.0.25/livejson"); curl_setopt($ch, CURLOPT_TIMEOUT, 5 ); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $jsondata = curl_exec($ch); echo $jsondata;'

Ich denke, es ist das Problem, das in https://stackoverflow.com/questions/3629504/php-file-get-contents-very-slow-when-using-full-url beschriebn ist. Zitat:" that the remote web server DIDN'T CLOSE THE TCP CONNECTION"

Expected behavior
auch die erste Variante sollte rasch die Antwort liefern.

Screenshots
n/a

Desktop (please complete the following information):
Raspi commandline

Additional context
DALY BMS to MQTT 2.2.11

@softwarecrash
Copy link
Owner

thanks,
the primary problem comes from the webserver lib, so i cant change this. but open a pull request to fix the problem, now waiting for response

@softwarecrash
Copy link
Owner

i have made a temp fix with own lib.
you can download the main source and compile itself.
the test with the php command will work.

@softwarecrash softwarecrash added the wontfix This will not be worked on label Mar 22, 2023
@softwarecrash
Copy link
Owner

so sorry to say that, but we cant fix this finaly. its a bug in the ESPAsyncWebserver lib

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants