TimeoutError: The read operation timed out on  return self._sslobj.read(len, buffer)
Labels: name: area: embeddings, name: auto:bug

### System Info

langchain               0.0.232

### Who can help?

_No response_

### Information

- [ ] The official example notebooks/scripts
- [ ] My own modified scripts

### Related Components

- [X] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [ ] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async

### Reproduction

I have deployed an Azure ML Endpoint with dollyv12-12b in Standard_F32s_v2

The based on the documentation:
https://python.langchain.com/docs/integrations/llms/azureml_endpoint_example

I try this code:

```
    content_formatter = DollyContentFormatter()
    llm = AzureMLOnlineEndpoint(
        #https://learn.microsoft.com/en-us/rest/api/azureml/2023-04-01/online-endpoints/get-token?tabs=HTTP#code-try-0
        endpoint_api_key="apikey",
        endpoint_url="https://azureml-xxx.westeurope.inference.ml.azure.com/score",
        deployment_name="databricks-dolly-v2-12b-8",
        model_kwargs={"temperature": 0.8, "max_tokens": 300},
        content_formatter=content_formatter,
    )
    formatter_template = "Write a {word_count} word essay about {topic}."

    prompt = PromptTemplate(
        input_variables=["word_count", "topic"], template=formatter_template
    )
    chain = LLMChain(llm=llm, prompt=prompt)
    print(chain.run({"word_count": 100, "topic": "how to make friends"}))
```
However I get this error:


Full Traceback:

2023-07-25 14:11:31.857 Uncaught app exception
Traceback (most recent call last):
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\Username\repos\frontendapp\app\pages\ask your documents azureml.py", line 126, in <module>
    main()
  File "C:\Users\Username\repos\frontendapp\app\pages\ask your documents azureml.py", line 98, in main
    print(chain.run({"word_count": 100, "topic": "how to make friends"}))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\chains\base.py", line 440, in run
    return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\chains\base.py", line 243, in __call__
    raise e
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\chains\base.py", line 237, in __call__
    self._call(inputs, run_manager=run_manager)
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\chains\llm.py", line 92, in _call
    response = self.generate([inputs], run_manager=run_manager)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\chains\llm.py", line 102, in generate
    return self.llm.generate_prompt(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\base.py", line 188, in generate_prompt
    return self.generate(prompt_strings, stop=stop, callbacks=callbacks, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\base.py", line 281, in generate
    output = self._generate_helper(
             ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\base.py", line 225, in _generate_helper
    raise e
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\base.py", line 212, in _generate_helper
    self._generate(
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\base.py", line 604, in _generate
    self._call(prompt, stop=stop, run_manager=run_manager, **kwargs)
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\azureml_endpoint.py", line 221, in _call
    endpoint_response = self.http_client.call(body)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\site-packages\langchain\llms\azureml_endpoint.py", line 39, in call
    response = urllib.request.urlopen(req, timeout=50)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\urllib\request.py", line 1352, in do_open
    r = h.getresponse()
        ^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\http\client.py", line 1378, in getresponse
    response.begin()
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\http\client.py", line 318, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\http\client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\socket.py", line 706, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\ssl.py", line 1278, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Username\anaconda3\envs\frontendapp\Lib\ssl.py", line 1134, in read
    return self._sslobj.read(len, buffer)

### Expected behavior

THe VM Size in Azure is big enough, but its only CPU, I dont have access to GPU, anyway, is it possible to change the request timeout to be able to test this?