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

Empty response to test curl #8

Closed
j1m-renwick opened this issue May 7, 2020 · 10 comments
Closed

Empty response to test curl #8

j1m-renwick opened this issue May 7, 2020 · 10 comments

Comments

@j1m-renwick
Copy link

When I start the docker image and run a GET curl request, I get the expected "Hello BASNet!" response, but when I try the POST test request mentioned in the readme, I only get an empty response:

$ curl -F "data=@apples.jpeg" http://localhost:8080 -o result.png

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                Dload  Upload   Total   Spent    Left  Speed
100  3249    0     0  100  3249      0    361  0:00:09  0:00:08  0:00:01     0
curl: (52) Empty reply from server

Curl seems to upload and send the image, but there is no response - if I try sending a bad request like ""data=" I get a 400 error, so it looks like the endpoint is correct and the code is being executed...just not when I send an image to be processed.

The only thing I can think of at this point is that the processing is so extreme. that the Macbook Pro I'm running it on can't handle it before the flask request timeout is reached, but this is just a wild guess. Anything you can suggest/advise would be helpful. Thanks :)

@cyrildiagne
Copy link
Owner

Just out of curiosity, to do the request with Postman?

@cyrildiagne
Copy link
Owner

As suggested here: https://github.com/cyrildiagne/ar-cutpaste/issues/26#issuecomment-625352279

@j1m-renwick
Copy link
Author

same response:

image

@LudovicoLucaSantucci
Copy link

LudovicoLucaSantucci commented May 7, 2020

I have the same problem.

$ curl -F "data=@Lion_Afrique.jpg" http://localhost:3000 -o result.png
% Total    % Received % Xferd  Average Speed   Time     Time       Time  Current
                                Dload  Upload  Total    Spent      Left   Speed
100 1364k    0       0  100 1364k   0    118k  0:00:11  0:00:11  --:--:--     0
curl: (52) Empty reply from server

Screenshot 2020-05-08 at 00 15 11

@cyrildiagne
Copy link
Owner

Could you try increasing the RAM of Docker as mentioned here? https://github.com/cyrildiagne/ar-cutpaste/issues/26#issuecomment-625689672

@sotospez
Copy link

sotospez commented May 8, 2020

i have the same with mac os , i change the settings of my docker to 4 core and more ram and works fine
thanks

@LudovicoLucaSantucci
Copy link

Thanks @cyrildiagne @sotospez
It works fine.
Screenshot 2020-05-08 at 14 05 28

@cyrildiagne
Copy link
Owner

Nice! @j1m-renwick can you confirm that works for you too?

@sotospez
Copy link

sotospez commented May 8, 2020

Works fine thanks @cyrildiagne

11
result

@j1m-renwick
Copy link
Author

@cyrildiagne yes that fixed the problem, thanks for your help :)

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

4 participants