# Build timeout

**URL:** <https://forum.defold.com/t/build-timeout/21642>\
**Category:** Bugs\
**Created:** [June 8, 2018, 1:21am UTC](https://forum.defold.com/t/build-timeout/21642 "2018-06-08T01:21:52Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [July 2, 2018, 9:57am UTC](https://forum.defold.com/t/build-timeout/21642/62 "2018-07-02T09:57:26Z")

</div>

only the following log is useful,other logs is about the defold update:  
com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out  
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155)  
at com.sun.jersey.api.client.Client.handle(Client.java:652)  
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)  
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)  
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570)  
at editor.engine.native\_extensions$build\_engine\_archive.invokeStatic(native\_extensions.clj:196)  
at editor.engine.native\_extensions$find\_or\_build\_engine\_archive.invokeStatic(native\_extensions.clj:208)  
at editor.engine.native\_extensions$get\_engine.invokeStatic(native\_extensions.clj:266)  
at editor.engine$get\_engine.invokeStatic(engine.clj:171)  
at editor.engine$launch\_BANG\_.invokeStatic(engine.clj:178)  
at editor.app\_view$launch\_engine\_BANG\_.invokeStatic(app\_view.clj:413)  
at editor.app\_view$launch\_built\_project\_BANG\_.invokeStatic(app\_view.clj:460)  
at editor.app\_view$fn\_\_48436$fnk48428\_positional\_\_48437$fn\_\_48438.invoke(app\_view.clj:571)  
at editor.app\_view$async\_build\_BANG\_$fn\_\_48350$fn\_\_48353.invoke(app\_view.clj:523)  
at clojure.lang.AFn.run(AFn.java:22)  
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)  
at java.security.AccessController.doPrivileged(Native Method)  
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)  
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)  
at com.sun.glass.ui.win.WinApplication.\_runLoop(Native Method)  
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: java.net.SocketTimeoutException: Read timed out  
at java.net.SocketInputStream.socketRead0(Native Method)  
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)  
at java.net.SocketInputStream.read(SocketInputStream.java:170)  
at java.net.SocketInputStream.read(SocketInputStream.java:141)  
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)  
at sun.security.ssl.InputRecord.read(InputRecord.java:503)  
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)  
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:930)  
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)  
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)  
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)  
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)  
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704)  
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647)  
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536)  
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)  
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)  
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)  
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.\_invoke(URLConnectionClientHandler.java:253)  
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)  
… 21 common frames omitted

---

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [July 2, 2018, 9:58am UTC](https://forum.defold.com/t/build-timeout/21642/63 "2018-07-02T09:58:14Z")

</div>

BTW,I think the caching task is the best solution

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [July 2, 2018, 2:27pm UTC](https://forum.defold.com/t/build-timeout/21642/64 "2018-07-02T14:27:27Z")

</div>

I’ve updated the server with a 10min timeout limit now. Please let me know if that helps the success rate.

I will continue with the other fixes as well. I’ll keep you updated.

---

<div class="post-metadata">

**Author:** ![joshua.winters](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@joshua.winters](https://forum.defold.com/u/joshua.winters)\
**Post date:** [July 3, 2018, 1:24am UTC](https://forum.defold.com/t/build-timeout/21642/65 "2018-07-03T01:24:19Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> Q: Comparing to your MacOSX builds: How many megabytes is the MacOSX build? (i.e. the libraries that you upload). And how many megabytes is the Win32 libraries?

In fact, in our project the Win32 libraries is much smaller than macOS libraries. Here is the detail info about the google protobuf extension which introduced the build problem:  
x86-win32: 12.4 MB  
x86\_64-win32: 21.2 MB  
x86\_64-osx: 51.5 MB

---

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [July 3, 2018, 1:54am UTC](https://forum.defold.com/t/build-timeout/21642/66 "2018-07-03T01:54:41Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> I’ve updated the server with a 10min timeout limit now.

It doesn’t help, still timeout all the time.

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [July 3, 2018, 7:56am UTC](https://forum.defold.com/t/build-timeout/21642/67 "2018-07-03T07:56:00Z")

</div>

The Editor 2 has now also been updated to have a 10min timeout.

It should have the sha1: bd8e9b221dc47489fd0ee20a3b2477ed27063c24 in the About box

---

<div class="post-metadata">

**Author:** ![gerrykwok7](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gerrykwok7/32/12764_2.png) [@gerrykwok7](https://forum.defold.com/u/gerrykwok7)\
**Post date:** [July 3, 2018, 8:00am UTC](https://forum.defold.com/t/build-timeout/21642/68 "2018-07-03T08:00:32Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> The Editor 2 has now also been updated to have a 10min timeout.

I recommend adding a timeout option to set to editor2, default to 10 min.

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/7/7afc895f23a75fac0cb024ae6c42a7d7ac384feb.png)

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [July 3, 2018, 8:07am UTC](https://forum.defold.com/t/build-timeout/21642/69 "2018-07-03T08:07:56Z")

</div>

Well, first I would really like to know what the actual problem is, not just randomly change things.  
For instance, you mention your MacOSX build works. Then, the Win32 build should only be longer by the amount that it builds, which should be ~1-2 minutes. We’ve now upped the timeout with both 5 and 9 minutes!

Could this have anything to do with your VPN service? E.g. are there any settings you can configure there? E.g. timeout values?

What upload/download speed do you get?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [July 18, 2018, 12:12pm UTC](https://forum.defold.com/t/build-timeout/21642/70 "2018-07-18T12:12:06Z")

</div>

HI again!

Now, with this release (1.2.133), the build server supports building with Clang 6.  
This allows for much faster (actual) build times (a few seconds).

You can enable it by adding this to your `game.appmanifest`:

```lua
platforms:
    x86-win32:
        context:
            use-clang: true

    x86_64-win32:
        context:
            use-clang: true

```

If you don’t use an app manifest already, you can add this to your `game.project`:

```lua
[native_extension]
app_manifest = /game.appmanifest

```

Please note that it doesn’t improve the upload/speeds. we are working on adding a file cache to the server to improve the turnaround times.

---

<div class="post-metadata">

**Author:** ![Terry](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.defold.com/u/Terry)\
**Post date:** [August 16, 2018, 12:54pm UTC](https://forum.defold.com/t/build-timeout/21642/71 "2018-08-16T12:54:40Z")

</div>

Hi Mathias,

One of the new team member was stopped by this issue for several days. I can not help, the only thing to do is trying some more tests and showing you the feedback. 😂 Hopes you can get the point.

The uploading speed is about 100~150KBs during these tests.

**bundle IOS application within 14 minutes**  
prepare local data without uploading 18:01 ~ 18:04  
uploading data to server 18:04 ~18:13  
uploading finished and application is ready: 18:13 ~ 18:15

**bundle andriod application within 15 minutes**  
prepare local data without uploading 19:47 ~ 19:52  
uploading data to server 19:52 ~20:20  
uploading finished and application is ready: 20:20 ~ 20:22

**bundle windows application without an ending**  
prepare local data without uploading 20:03 ~ 20:07  
uploading data to server 20:08 ~ 20:16  
uploading finished and application is ready: 20:16 ~ nerver(I had waited for more than 20 minutes here and nothing happens even without a timeout indication like the building process)

If the bundle process is similar to the build process, then the issue is not releated to network status. Would you please take a look at the logs on your build server? At least we shall know what happens during these tests.If the single building step for windows target is successful and longer than other target, you can also show us the detailed time cost.

Maybe I can remove some native extentions to findout the critical point where the project could be built for windows tomorrow.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 16, 2018, 5:22pm UTC](https://forum.defold.com/t/build-timeout/21642/72 "2018-08-16T17:22:57Z")

</div>

> [@Terry](#):
>
> bundle windows application without an ending

Have you tried building with clang instead? As mentioned here: [Defold 1.2.133 has been released](https://forum.defold.com/t/defold-1-2-133-has-been-released/24854)

> [@Terry](#):
>
> prepare local data without uploading 18:01 ~ 18:04

You mean that this is the time before you see anything being sent to [build.defold.com](http://build.defold.com)?

> [@Terry](#):
>
> uploading data to server 19:52 ~20:20

This is both upload of extension code, the build process on the server and then download of custom engine?

> [@Terry](#):
>
> uploading finished and application is ready: 20:20 ~ 20:22

Is this from when you don’t see any more network traffic and the editor does the bundling of the app?

---

<div class="post-metadata">

**Author:** ![Terry](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.defold.com/u/Terry)\
**Post date:** [August 17, 2018, 7:03am UTC](https://forum.defold.com/t/build-timeout/21642/73 "2018-08-17T07:03:22Z")

</div>

We did tried the clang6 and got some building errors like [A building error in release version 1.2.133 with Clang 6](https://forum.defold.com/t/a-building-error-in-release-version-1-2-133-with-clang-6/25286).

From these bundle tests, it seems to show three steps.  
In the first step, the editor is preparing for some resource data. During this period, there is no obvious network traffic.

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/e/e7b1f5fcd5c53ac94047bb237ea3ae99a81e256c.png)  
The building report also showes more details:  
 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/8/8823ba7e1979907c2954284a3c860cf5cd314222.png)

In the second step, the upload is continued for about 8 miutes. According to the uploading rate, about 8_60_100KB = 48MB data(libs or source codes) is sent to the server.

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/5/55ed8d921f0b55ba4673ee5151f8693399de50f9.png)

In the third step, the building and linking is processed on the server without network traffic. Finnally, the result program(about 8MB) is sent back from the server at speed 500KB/s (due to the company network download limitation configuration).

When did the same test for macos application on MAC OS, the uploading speed is about 2~3 times faster than the test on windows. Are there any differences in the uploading when bundle the MAC application from different editors?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 17, 2018, 7:22am UTC](https://forum.defold.com/t/build-timeout/21642/74 "2018-08-17T07:22:40Z")

</div>

> [@Terry](#):
>
> When did the same test for macos application on MAC OS, the uploading speed is about 2~3 times faster than the test on windows

Not sure why that would differ. @Erik_Angelin? @Mathias_Westerdahl?

> [@Terry](#):
>
> about 860100KB = 48MB data(libs or source codes) is sent to the server

That is quite a lot, especially at the upload speeds you mention. @Mathias_Westerdahl, ideas on how to reduce amount of upload? Upload only diffs and cache on the server?

---

<div class="post-metadata">

**Author:** ![Erik\_Angelin](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/e/59ef9b/32.png) [@Erik\_Angelin](https://forum.defold.com/u/Erik_Angelin)\
**Post date:** [August 17, 2018, 7:34am UTC](https://forum.defold.com/t/build-timeout/21642/75 "2018-08-17T07:34:17Z")

</div>

> [@Terry](#):
>
> When did the same test for macos application on MAC OS, the uploading speed is about 2~3 times faster than the test on windows. Are there any differences in the uploading when bundle the MAC application from different editors?

There is no difference in how we perform the upload on mac vs windows. Have you tried doing a general internet upload/download speed test on mac and windows? For instance, if you’re on wifi it could be that the windows machine chooses some other encryption method or doesn’t support 5g or whatever. Not saying that’s the case for you.

---

<div class="post-metadata">

**Author:** ![Terry](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.defold.com/u/Terry)\
**Post date:** [August 17, 2018, 8:46am UTC](https://forum.defold.com/t/build-timeout/21642/76 "2018-08-17T08:46:46Z")

</div>

Hi Eric,

Here is the general network test result from the speedtest website for our working environment. The uploading rate is the same on MAC(wifi connection) and Windows(ethernet connection).

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/8/8da56f4095818b3261501cff0481ca3240735094.png)

Is there any hint that why the windows editor only can reach a half(about 100KB/s)?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 17, 2018, 8:49am UTC](https://forum.defold.com/t/build-timeout/21642/77 "2018-08-17T08:49:43Z")

</div>

> [@Terry](#):
>
> Is there any hint that why the windows editor only can reach a half(about 100KB/s)?

It is very likely outside our control. I’m assuming that the upload code is the same between the two platforms (the editor is after all cross platform using a single code base), although the underlying implementation (which we don’t control) could be different.

---

<div class="post-metadata">

**Author:** ![Terry](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.defold.com/u/Terry)\
**Post date:** [August 20, 2018, 7:45am UTC](https://forum.defold.com/t/build-timeout/21642/78 "2018-08-20T07:45:51Z")

</div>

Hi Britzl,

I had made another bundle test on windows in the early morning before most guys coming to the office. It does work better then at normal working time.

The highest uploading rate now almost get the same result as the test made in the browser yesterday.  
There are also some wireshark capture records showing the same result. When upload raw source code files(small size), the performance is dropped duo to the packet size.

**Raw source code files**

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/7/7d3aac85985412c49aab4198d5f9d2231dfef874.png)  
33 files with size 122432 bytes with 33 TLS communication rounds within 1 seconds.

**A single lib**

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/c/c87ecc3db892c23589340482c1ccd99fc7f13211.png)  
1 file with size 543411 bytes with 33 TLS communication rounds within 2 seconds.

The pure building and linking on the server only cost about 40+ seconds, this shall not be the cause for the timeout. Definitely we still needs to add more extentions in the project, and then we will see when this timeout issue comes again.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 20, 2018, 7:58am UTC](https://forum.defold.com/t/build-timeout/21642/79 "2018-08-20T07:58:41Z")

</div>

Thank you for getting back to us with additional details! We will start looking into caching of uploads so that you don’t have to upload everything for each rebuild. @Mathias_Westerdahl and @nasthu will start design and implementation of this very soon.

---

<div class="post-metadata">

**Author:** ![Terry](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/t/b9e5f3/32.png) [@Terry](https://forum.defold.com/u/Terry)\
**Post date:** [August 21, 2018, 4:34am UTC](https://forum.defold.com/t/build-timeout/21642/80 "2018-08-21T04:34:59Z")

</div>

Hi all,

Hopes to see this wonderful feature soon.

Finally the IT department helps to release to limitaion on the uploading rate. Now I get a pretty good uploading test result.

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/a/a1278dfb99648c37645ee0f669d1062550f145bd.png)

When bundle the application, the uploading rate does only have little improvement.  
There is an explicit stop in the uploading that in each 4 packet. Looks like the sending continues for 50ms with 4 packet(16K, TLS max record size) and wait for 180ms. The maxmum uploading speed is 278KB/s.

 ![image](https://forum-defold-uploads.b-cdn.net/original/2X/6/6bdb753c3f5cdb40a42a002036f3f98ca32b328b.png)

Would you please take a look at the socket sending buffer size(editor) and socket receiving buffer size(server) ? Maybe chage the default value from 16K to 64K can make sense for large uploading data, 😃

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [August 21, 2018, 4:49am UTC](https://forum.defold.com/t/build-timeout/21642/81 "2018-08-21T04:49:35Z")

</div>

Make an issue for that on the github?

[Previous page](https://forum.defold.com/t/build-timeout/21642.md?page=3)

[Next page](https://forum.defold.com/t/build-timeout/21642.md?page=5)
