# could not send SSL negotiation packet: Resource temporarily unavailable

**URL:** <https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612>\
**Category:** General\
**Tags:** laravel, php, login-only\
**Created:** [June 28, 2024, 2:30pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612 "2024-06-28T14:30:33Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaeger](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/yaeger/32/44383_2.png) [@Yaeger](https://community.fly.io/u/Yaeger)\
**Post date:** [June 28, 2024, 2:30pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/1 "2024-06-28T14:30:33Z")

</div>

Is anyone else running into this? My (Laravel) app suddenly stopped working. It gives 500 errors because of the error as mentioned in the title:

`2024-06-28T14:28:39Z app[e286011c9d9718] ams [info]{"message":"SQLSTATE[08006] [7] could not send SSL negotiation packet: Resource temporarily unavailable (SQL: select * from \"sessions\" where \"id\" = 8dLPlpfUE0pI2ZduBEXSVTdLnFC2JPIqcI037mil limit 1)","context":{"exception":{"class":"Illuminate\\Database\\QueryException","message":"SQLSTATE[08006] [7] could not send SSL negotiation packet: Resource temporarily unavailable (SQL: select * from \"sessions\" where \"id\" = 8dLPlpfUE0pI2ZduBEXSVTdLnFC2JPIqcI037mil limit 1)","code":7,"file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760","previous":{"class":"PDOException","message":"SQLSTATE[08006] [7] could not send SSL negotiation packet: Resource temporarily unavailable","code":7,"file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70"}}},"level":400,"level_name":"ERROR","channel":"production","datetime":"2024-06-28T16:28:39.590724+02:00","extra":{}}`

---

<div class="post-metadata">

**Author:** ![ryvami](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/ryvami/32/36706_2.png) [@ryvami](https://community.fly.io/u/ryvami)\
**Post date:** [June 28, 2024, 10:13pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/2 "2024-06-28T22:13:16Z")

</div>

I am also having this issue with my Laravel 11 application. It is quite annoying because I have been on it for a while since yesterday (06/27/2024 around 8 PM PST) rolling back my releases, but nothing seems to work. I even checked if there is something wrong with my Supabase database, but my local instance is able to connect to it perfectly fine with a forced SSL connection.

I don’t know if this is related to the issue, but my deploying process has been pretty finicky with this error: `Failed to fetch an image or build from source: failed to list volumes: Get "https://api.machines.dev/v1/apps/fly-builder-misty-cloud-1280/volumes": remote error: tls: handshake failure`  
I would have to just keep try running the deploy script until it would go through with the build process. It may be a coincidence, but I only started getting this error when my application stopped working. I am assuming these errors are on [Fly.io](http://Fly.io)’s end because I am out of ideas on what to try and also you are also having this issue.

---

<div class="post-metadata">

**Author:** ![discoverlance](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/discoverlance/32/36126_2.png) [@discoverlance](https://community.fly.io/u/discoverlance)\
**Post date:** [June 29, 2024, 1:53pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/3 "2024-06-29T13:53:28Z")

</div>

I am also having this same issue but only noticing it now, I am using a database on railway. Just trying to login there next to check but it’s basically causing issues all over the place on my website and dashboard apps. I noticed the same issue over the past few days but it was during builds and I really did not care about the change enough to look at a fix so I just ignored the failed builds. It was only yesterday that the build actually succeeded for the laravel application and just now, I am seeing the same error but on my built application on fly.

---

<div class="post-metadata">

**Author:** ![Yaeger](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/yaeger/32/44383_2.png) [@Yaeger](https://community.fly.io/u/Yaeger)\
**Post date:** [June 29, 2024, 2:08pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/4 "2024-06-29T14:08:27Z")

</div>

@discoverlance @ryvami Check this github thread: [Possible bug with PHP PDO and with PostgreSQL · Issue #14665 · php/php-src · GitHub](https://github.com/php/php-src/issues/14665)

I solved it after removing `php8.2-swoole` in the Dockerfile. It’s an issue with PHP 8.2.20 in combination with the swoole extension

---

<div class="post-metadata">

**Author:** ![discoverlance](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/discoverlance/32/36126_2.png) [@discoverlance](https://community.fly.io/u/discoverlance)\
**Post date:** [June 29, 2024, 2:14pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/5 "2024-06-29T14:14:39Z")

</div>

Since I am using fly’s original Dockerfile for laravel deployment and it has no direct installation of swoole in it so I am not sure how to remove that? Are you using a custom docker file? The Dockerfile has no installation line for swoole only the config file or is that what does the trick? Also, I am not using octane in my application

```auto
# syntax = docker/dockerfile:experimental

# Default to PHP 8.2, but we attempt to match
# the PHP version from the user (wherever `flyctl launch` is run)
# Valid version values are PHP 7.4+
ARG PHP_VERSION=8.2
ARG NODE_VERSION=16
ARG POSTGRES_VERSION=13
FROM fideloper/fly-laravel:${PHP_VERSION} as base

RUN curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null

RUN echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list

RUN apt-get update

RUN apt-get install -y postgresql-client-13

# PHP_VERSION needs to be repeated here
# See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG PHP_VERSION

LABEL fly_launch_runtime="laravel"

# copy application code, skipping files based on .dockerignore
COPY . /var/www/html

RUN composer install --optimize-autoloader --no-dev \
    && mkdir -p storage/logs \
    && php artisan optimize:clear \
    && chown -R www-data:www-data /var/www/html \
    && sed -i 's/protected \$proxies/protected \$proxies = "*"/g' app/Http/Middleware/TrustProxies.php \
    && echo "MAILTO=\"\"\n* * * * * www-data /usr/bin/php /var/www/html/artisan schedule:run" > /etc/cron.d/laravel \
    && cp .fly/entrypoint.sh /entrypoint \
    && chmod +x /entrypoint

# If we're using Octane...
RUN if grep -Fq "laravel/octane" /var/www/html/composer.json; then \
    rm -rf /etc/supervisor/conf.d/fpm.conf; \
    if grep -Fq "spiral/roadrunner" /var/www/html/composer.json; then \
    mv /etc/supervisor/octane-rr.conf /etc/supervisor/conf.d/octane-rr.conf; \
    if [-f ./vendor/bin/rr]; then ./vendor/bin/rr get-binary; fi; \
    rm -f .rr.yaml; \
    else \
    mv .fly/octane-swoole /etc/services.d/octane; \
    mv /etc/supervisor/octane-swoole.conf /etc/supervisor/conf.d/octane-swoole.conf; \
    fi; \
    rm /etc/nginx/sites-enabled/default; \
    ln -sf /etc/nginx/sites-available/default-octane /etc/nginx/sites-enabled/default; \
    fi

# Multi-stage build: Build static assets
# This allows us to not include Node within the final container
FROM node:${NODE_VERSION} as node_modules_go_brrr

RUN mkdir /app

RUN mkdir -p /app
WORKDIR /app
COPY . .
COPY --from=base /var/www/html/vendor /app/vendor

# Use yarn or npm depending on what type of
# lock file we might find. Defaults to
# NPM if no lock file is found.
# Note: We run "production" for Mix and "build" for Vite
RUN if [-f "vite.config.js"]; then \
    ASSET_CMD="build"; \
    else \
    ASSET_CMD="production"; \
    fi; \
    if [-f "yarn.lock"]; then \
    yarn install --frozen-lockfile; \
    yarn $ASSET_CMD; \
    elif [-f "package-lock.json"]; then \
    npm ci --no-audit; \
    npm run $ASSET_CMD; \
    else \
    npm install; \
    npm run $ASSET_CMD; \
    fi;

# From our base container created above, we
# create our final image, adding in static
# assets that we generated above
FROM base

# Packages like Laravel Nova may have added assets to the public directory
# or maybe some custom assets were added manually! Either way, we merge
# in the assets we generated above rather than overwrite them
COPY --from=node_modules_go_brrr /app/public /var/www/html/public-npm
RUN rsync -ar /var/www/html/public-npm/ /var/www/html/public/ \
    && rm -rf /var/www/html/public-npm \
    && chown -R www-data:www-data /var/www/html/public

EXPOSE 8080

ENTRYPOINT ["/entrypoint"]

```

---

<div class="post-metadata">

**Author:** ![Yaeger](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/yaeger/32/44383_2.png) [@Yaeger](https://community.fly.io/u/Yaeger)\
**Post date:** [June 29, 2024, 4:46pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/6 "2024-06-29T16:46:29Z")

</div>

I just did it like this:

 ![image](https://global.discourse-cdn.com/fly1/original/3X/9/9/9918c881b79a1127c19f4f0ca56f3997ca076b56.png)

I am also not using octane, but the extension is installed either way 🙂

> <https://github.com/fly-apps/laravel-docker/blob/main/src/Dockerfile#L35>

---

<div class="post-metadata">

**Author:** ![discoverlance](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/discoverlance/32/36126_2.png) [@discoverlance](https://community.fly.io/u/discoverlance)\
**Post date:** [June 30, 2024, 4:23pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/7 "2024-06-30T16:23:17Z")

</div>

This worked for me! Thanks a lot

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [July 7, 2024, 4:23pm UTC](https://community.fly.io/t/could-not-send-ssl-negotiation-packet-resource-temporarily-unavailable/20612/8 "2024-07-07T16:23:49Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
