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

Add timeout middleware to handle long-running requests #41

Open
mattfsourcecode opened this issue Jan 16, 2025 · 0 comments
Open

Add timeout middleware to handle long-running requests #41

mattfsourcecode opened this issue Jan 16, 2025 · 0 comments

Comments

@mattfsourcecode
Copy link
Owner

Details:

  • Introduce middleware to automatically timeout requests that exceed a predefined duration (e.g., 30 seconds). This prevents potential resource exhaustion and improves the responsiveness of the server.
  • Provide informative error messages for timed-out requests and log them for monitoring purposes.

Action Items:

  1. Use middleware like connect-timeout or implement custom logic to detect and terminate long-running requests.
  2. Ensure the timeout duration is configurable via environment variables.
  3. Write tests to verify timeouts for requests exceeding the limit.
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