Skip to content

Commit 7eb2f3f

Browse files
authored
Merge pull request #85 from DefangLabs/eric/extend-timeout-for-http-to-avoid-502-gateway
extend http timeout
2 parents 3982f09 + 51ab622 commit 7eb2f3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
1212
git \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15-
# Install Go for x86 architecture (latest supported version 1.21)
15+
# Install Go for AMD64 architecture (latest supported version 1.21)
1616
RUN curl -OL https://golang.org/dl/go1.21.1.linux-amd64.tar.gz && \
1717
tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz && \
1818
rm go1.21.1.linux-amd64.tar.gz
@@ -49,4 +49,6 @@ EXPOSE 5050
4949
ENV FLASK_APP=app.py
5050

5151
# Run the application using uWSGI
52-
CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "4"]
52+
# CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "4"]
53+
# longer timeout settings to allow for slower rag and llm responses
54+
CMD ["uwsgi", "--lazy-apps", "--http", "0.0.0.0:5050", "--wsgi-file", "app.py", "--callable", "app", "--processes", "4", "--harakiri", "300", "--socket-timeout", "300", "--http-timeout", "300", "--http-keepalive", "--http-auto-chunked"]

0 commit comments

Comments
 (0)