google / google/generative-ai-docs

Gemini REST API implemented in NodeJs application works on localhost but fails in production

Open
#258 4 comments 0 reactions 0 assignees View on GitHub
type:bug
Dominant language
Jupyter Notebook
Stars
2.3k
Forks
735
PR merge metrics
No merged PRs in 30d

Description

### Description of the bug:

Gemini REST API implemented in NodeJs application works on localhost but fails in production. Returns 502 error seen below

Gemini endpoint used: https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=$API_KEY

```
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request

Reason: Error reading from remote server
```

Error log in server Apache Ubuntu 20.04 gives

> [proxy_http:error] [pid 756595] (70007)The timeout specified has expired: ....AH01102: error reading status line from remote server localhost:5001
> [proxy:error] [pid 756595] ...AH00898: Error reading from remote server returned by /gig/geminize

Can I get any help to resolve this urgently please?

Thanks

### Actual vs expected behavior:

_No response_

### Any other information you'd like to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.