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

Exiting without providing any reason #45

Open
bkuhl opened this issue Jun 14, 2021 · 0 comments
Open

Exiting without providing any reason #45

bkuhl opened this issue Jun 14, 2021 · 0 comments

Comments

@bkuhl
Copy link

bkuhl commented Jun 14, 2021

I'm trying to use this project in a containerized fashion with Lambda (there's not a lot of docs for using Docker). I've been through the docs here and through Bref and am unsure what I'm missing/doing wrong. When processing lobs locally and within AWS I get the error:

{
    "errorMessage": "RequestId: 36907a63-97ff-478b-b1fd-630f060a8661 Error: Runtime exited without providing a reason",
    "errorType": "Runtime.ExitError"
}

Locally I'm able to use serverless invoke -f worker --file=sqs-queue-event.json to tell my local env to process the job. However both locally and in AWS that's the only feedback I get, with no errors or anything on the Laravel side. It just doesn't work 🤷 . Logs are configured to go to stderr locally and bugsnag/stderr in Lambda.

My Dockerfile:

FROM bref/php-80

ADD . /var/task

    # production-ready dependencies
RUN curl -s https://getcomposer.org/installer | php \
    && php composer.phar install  --no-interaction --optimize-autoloader --no-dev --prefer-dist --no-cache \
    && rm composer.phar

ENTRYPOINT ["php", "worker.php"]

My container is defined within the serverless architecture as:

functions:
  worker:
    reservedConcurrency: 10
    image: xxxxx.xxxxx.amazonaws.com/[project]:lambda-serverless
    events:
      # Declares that our worker is triggered by jobs in SQS
      -   sqs:
            arn: !GetAtt SendMessagesQueue.Arn
            # If you create the queue manually, the line above could be:
            # arn: 'arn:aws:sqs:us-east-1:1234567890:my_sqs_queue'
            # Only 1 item at a time to simplify error handling
            batchSize: 1
mnapoli added a commit that referenced this issue Mar 9, 2023
* Make sure the OctaneHandler is not created by the Laravel kernel

Indeed, Octane boots Laravel (not the other way around)

* sort

---------

Co-authored-by: Till Krüss <tillkruss@users.noreply.github.com>
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

1 participant