502 error after droplet resize. Ngninx error related to SSL


After resizing down one of my droplet I got the error 502. Everything was working perfectly before. Looking into the log of ngninx i got:

[crit] 8045#8045: *89 SSL_do_handshake() failed (SSL: error:141CF06C:SSL routines:tls_parse_ctos_key_share:bad key share) while SSL handshaking, client:, server:

I use laravel forge to deploy the site. The api is laravel and the front end is nuxt. I tried to recreate a let’s encrypt certificate from forge but it’s not working. I also tried to resize up the droplet, turn off/on ngninx, server, php… Nothing works.

Thank you for your help, Daniel

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer


Sorry for such a late reply. I didn’t connect and forgot about this post. The error was due to something with pm2. I killed all the processes and restart them. It worked perfectly after.

Thank you so much for all your answers and help ! :)

Site Moderator
Site Moderator badge
October 6, 2023

Heya, @dany68

Inspecting the Nginx error_log should give you additional information about the issue. Bobby already provided information on how to check the log but you can also have a look at this article:

On a further note, have you noticed any other issues that can be related to the downsizing of the droplet? You can examine the droplet’s resource usage and check if the memory or CPU has some usage spikes.

Hope that this helps!

Bobby Iliev
Site Moderator
Site Moderator badge
October 2, 2023

Hi there,

I think that the warning that you’ve shared should not really cause the 502 error as discussed in this post here.

I could suggest checking the Nginx error log again using this command:

tail -f /var/log/nginx/error.log

And then once you run the command refresh your site a few times to trigger the 502 error and then check the output again.

Feel free to share the output here so I can try to advise you further!

Usually, the 502 error with PHP applications occurs if the Nginx configuration is not using the correct PHP-FPM backend or if PHP-FPM is not running for any reason. So it could be worth checking the PHP-FPM logs and status as well.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel