<p>You can try configuring the timeout in <code>cardano/plutus/plutus-playground-client/webpack.config.js</code></p>
<pre><code>devServer: {
    contentBase: path.join(__dirname, &quot;dist&quot;),
    compress: true,
    port: 8009,
    https: true,
    proxy: {
        &quot;/api&quot;: {
            target: 'http://localhost:8080'
            timeout: 1000 * 60 * 10
        }
    } },
</code></pre>
<p>There also appears to be a <code>proxyTimeout</code> setting that you can try.</p>
<p>I can't reproduce the error on my end so I'm not sure if this will work, but it seems to make sense that the webpack server is timing out.</p>
<p>Here is a general question posted about webpack dev server timeouts that suggest trying the configurations I mentioned above.</p>
<p><a href="https://stackoverflow.com/questions/47217090/how-can-i-let-webpack-dev-server-have-incoming-request-timeout-with-custom-value">https://stackoverflow.com/questions/47217090/how-can-i-let-webpack-dev-server-have-incoming-request-timeout-with-custom-value</a></p>

CC BY-SA 4.0
2021-10-13T18:54:03.677Z
Unfortunately, it's not a request from the browser to the client app that's timing out, it a request from the server app to a WebGHC instance to compile the code. You won't get away without modifying the source of the server, as outlined in my answer.
Ari Fordsham
CC BY-SA 4.0
2021-06-10T11:07:49.743Z
2021-06-10T11:07:49.743Z
Frank DelPidio
<p>This is indeed due to a timeout expiring.</p>
<p>It is not, however, a request sent by the browser timing out, so changing the client Webpack config will not solve the problem as @Frank suggests.</p>
<p>The Plutus Playground server uses WebGHC, served to a different localhost port, to compile the code, and submits the file to the WebGHC instance via a HTTP request. This may take some time to run, and on a slow machine, it can exceed the 30 second timeout.</p>
<p>To fix this, you'll need to dig in to the Haskell source of the playground server.</p>
<ul>
<li><p>In the Plutus directory, open the file <code>plutus-playground-server/src/Playground/Server.hs</code> in an editor.</p>
</li>
<li><p>Change these lines:</p>
<ul>
<li>(around line 29)
<pre><code>import           Network.HTTP.Client.Conduit  (defaultManagerSettings)
</code></pre>
==&gt;
<pre><code>import           Network.HTTP.Client.Conduit  (defaultManagerSettings, managerResponseTimeout, responseTimeoutMicro)
</code></pre>
</li>
<li>(around line 114)
<pre><code>manager &lt;- newManager defaultManagerSettings
</code></pre>
==&gt;
<pre><code>manager &lt;- newManager (defaultManagerSettings { managerResponseTimeout = responseTimeoutMicro (1000 * 60 * 1000000) })
</code></pre>
</li>
</ul>
</li>
<li><p>You'll then need to rebuild the server</p>
<pre><code>cd /path/to/plutus
nix-build -A plutus-playground.server
</code></pre>
<p>and then switch back to <code>plutus-playground-client</code> and re-run <code>plutus-playground-server</code>.</p>
</li>
</ul>
<p>This has actually been fixed in more recent versions of the playground (to take a timeout on the command line), but the Pioneer Program is pinned to a specific commit, so won't get the update.</p>

CC BY-SA 4.0
2021-10-13T18:42:57.467Z
2021-10-13T19:09:32.437Z
2021-10-13T19:09:32.437Z
Ari Fordsham
<p>I'm setting up my environment to run the example from lecture #1 (Week01 auction)</p>
<p>All compilations went well but when I try the evaluate in the simulator I always receive:</p>
<pre><code>interpreter Errors
ConnectionError (HttpExceptionRequest Request { host = &quot;localhost&quot; port = 8080 secure = False requestHeaders = [(&quot;Accept&quot;,&quot;application/json;charset=utf-8,application/json&quot;),(&quot;Content-Type&quot;,&quot;application/json;charset=utf-8&quot;)] path = &quot;/runghc&quot; queryString = &quot;&quot; method = &quot;POST&quot; proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 } ResponseTimeout)
Please try again or contact support for assistance.
</code></pre>
<p>The plutus-playground-server log has the smartcontract and the datum so I think that the call for evaluation was correctly sent but somehow it doesn't come back to the client. In my opinion it's more an issue related to the npm but I don't know how to debug it.</p>
<p>I'm using Ubuntu, all the work done through nix-shell. Plutus tag: <code>3746610e53654a1167aeb4c6294c6096d16b0502</code></p>
<p><strong>UPDATE</strong></p>
<p>Further analysis brings me to the conclusion that my system is too slow for the client-server interaction. I saw that the issue is related only to the Auction contract (that's heavier than the demo ones) and watching the trace of the HTTP calls i notice that the /runghc POST takes 34 seconds to give back an answer.</p>
<p>Is there any way i can configure the playground server to consider a timeout higher than 30 secs?</p>

CC BY-SA 4.0
2021-05-26T00:11:24.207Z
Seems strange for it to be a timeout issue (though I'm not an expert) as the server and the client should both be running on your laptop. I followed the steps as shown in [Leet Dev's](https://www.youtube.com/watch?v=Cdu0gzCiYbY&t=1146s) YT channel - is that what you did to?
Reddspark
<simulator><plutus-playground><plutus-pioneer-program>
Plutus Pioneer Program - Problem with plutus playground client
# Plutus Pioneer Program - Problem with plutus playground client

(Asked by: username_0 on 2021-05-08)

I'm setting up my environment to run the example from lecture #1 (Week01 auction)
All compilations went well but when I try the evaluate in the simulator I always receive:
interpreter Errors
ConnectionError (HttpExceptionRequest Request { host = "localhost" port = 8080 secure = False requestHeaders = [("Accept","application/json;charset=utf-8,application/json"),("Content-Type","application/json;charset=utf-8")] path = "/runghc" queryString = "" method = "POST" proxy = Nothing rawBody = False redirectCount = 10 responseTimeout = ResponseTimeoutDefault requestVersion = HTTP/1.1 } ResponseTimeout)
Please try again or contact support for assistance.

The plutus-playground-server log has the smartcontract and the datum so I think that the call for evaluation was correctly sent but somehow it doesn't come back to the client. In my opinion it's more an issue related to the npm but I don't know how to debug it.
I'm using Ubuntu, all the work done through nix-shell. Plutus tag: 3746610e53654a1167aeb4c6294c6096d16b0502
UPDATE
Further analysis brings me to the conclusion that my system is too slow for the client-server interaction. I saw that the issue is related only to the Auction contract (that's heavier than the demo ones) and watching the trace of the HTTP calls i notice that the /runghc POST takes 34 seconds to give back an answer.
Is there any way i can configure the playground server to consider a timeout higher than 30 secs?

**Tags:** simulator, plutus-playground, plutus-pioneer-program
> **Comments:**
> **username_1**: Seems strange for it to be a timeout issue (though I'm not an expert) as the server and the client should both be running on your laptop. I followed the steps as shown in [Leet Dev's](https://www.youtube.com/watch?v=Cdu0gzCiYbY&t=1146s) YT channel - is that what you did to?  

---

## 2 answers

### Answer by username_2 on 2021-06-10. Score: 3

You can try configuring the timeout in cardano/plutus/plutus-playground-client/webpack.config.js
devServer: {
    contentBase: path.join(__dirname, "dist"),
    compress: true,
    port: 8009,
    https: true,
    proxy: {
        "/api": {
            target: 'http://localhost:8080'
            timeout: 1000 * 60 * 10
        }
    } },

There also appears to be a proxyTimeout setting that you can try.
I can't reproduce the error on my end so I'm not sure if this will work, but it seems to make sense that the webpack server is timing out.
Here is a general question posted about webpack dev server timeouts that suggest trying the configurations I mentioned above.
https://stackoverflow.com/questions/47217090/how-can-i-let-webpack-dev-server-have-incoming-request-timeout-with-custom-value

> **Comments:**
> **username_3**: Unfortunately, it's not a request from the browser to the client app that's timing out, it a request from the server app to a WebGHC instance to compile the code. You won't get away without modifying the source of the server, as outlined in my answer.  

---

### Answer by username_3 on 2021-10-13. Score: 0

This is indeed due to a timeout expiring.
It is not, however, a request sent by the browser timing out, so changing the client Webpack config will not solve the problem as @Frank suggests.
The Plutus Playground server uses WebGHC, served to a different localhost port, to compile the code, and submits the file to the WebGHC instance via a HTTP request. This may take some time to run, and on a slow machine, it can exceed the 30 second timeout.
To fix this, you'll need to dig in to the Haskell source of the playground server.

In the Plutus directory, open the file plutus-playground-server/src/Playground/Server.hs in an editor.

Change these lines:

(around line 29)
import           Network.HTTP.Client.Conduit  (defaultManagerSettings)

==>
import           Network.HTTP.Client.Conduit  (defaultManagerSettings, managerResponseTimeout, responseTimeoutMicro)


(around line 114)
manager <- newManager defaultManagerSettings

==>
manager <- newManager (defaultManagerSettings { managerResponseTimeout = responseTimeoutMicro (1000 * 60 * 1000000) })




You'll then need to rebuild the server
cd /path/to/plutus
nix-build -A plutus-playground.server

and then switch back to plutus-playground-client and re-run plutus-playground-server.


This has actually been fixed in more recent versions of the playground (to take a timeout on the command line), but the Pioneer Program is pinned to a specific commit, so won't get the update.


---

