Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1geHEE-0001Es-2R for pgadmin-hackers@arkaria.postgresql.org; Tue, 01 Jan 2019 10:24:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1geHEC-00084N-8S for pgadmin-hackers@arkaria.postgresql.org; Tue, 01 Jan 2019 10:24:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1geHEB-00084G-Lx for pgadmin-hackers@lists.postgresql.org; Tue, 01 Jan 2019 10:24:51 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1geHE8-0001Fc-BD for pgadmin-hackers@postgresql.org; Tue, 01 Jan 2019 10:24:49 +0000 Received: by mail-lf1-x134.google.com with SMTP id a16so19366432lfg.3 for ; Tue, 01 Jan 2019 02:24:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=OSunv6msyvoTERObeL3qC5adilF869aHK3ntQRKre+k=; b=nEzIgsW6CIZg3h0Qi3OVOVihQK/6edXflG1V5JdHohQhADJGtEeDOO4sS+7M8A9v6H MGLDSs8xfqQHp2mf0eW74ybHpIBUAba7p0HFmR4A5i9uZMSEzRZ9o/VJDb9gXjvhbnqu NmzgFPIgJaYUeWNiT/9DRNBSh2oqRS/k1opkE15ujZNsR7TQ1OZPLi9vQZhnoJJkmjqR uaOoccMJz404RrBCgg5KEqzYmWFPlHKm/c1eybnCKDCGAHKezze6UMbgS3YD0iBn2H1Y G6lDIwm3Pip+BAnHRJm4iZbJwLC6/ULcHOZZ8BQa+5nUG9yD7LhngbPvxfvQUHxVkHsy odHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=OSunv6msyvoTERObeL3qC5adilF869aHK3ntQRKre+k=; b=cWOI7D6ieukt9Jn7yEIGlrZCuKC1kH4GpyqlxfIPrMvmLJ2EXJrBxFjWv9eEVuLl7w F6yPhWMmLMqWivf/vt6Yd8Y4fYvQqSTwpxF48h/Qult1g6i7n7ByPLF78i7Oxi6BwRjK zmxzU1+CspuK/c1/reUMnzU30K0oLrgMQ5xmx3bbM20TD8zP2LG2DCo/KNDVOMie+Lg6 Lg/wGPSTSI/6jKMEU1IU3xWiZRL03w8xLd71FPmW+wsFq2MnNFD0kBXRLS0+1mjMnlQ7 dY2Rkc9hv8lblWs8E1HBI6V7OnwXI3zfBeFej4VnRk+/IMi9g+SBAO1oCeNo2J8W4Wxn V+6g== X-Gm-Message-State: AA+aEWY+qkbpLRrP3+SZOAkIh//HUbyaDlRd4VVrzNXRkLKOqmbxsPWW +MPGdFIdMgydeD7YUyiljG9MtNYD8lz4StYBxEhHgUpB32oVVQ== X-Google-Smtp-Source: AFSGD/WRs99/LV7sU83P8USBGQluygXUtvbcqEf51QP35/EZlWFLIKL6v16xqYRWr88tuQr78j+QAiF51AGn0FTpF8c= X-Received: by 2002:a19:c70a:: with SMTP id x10mr19499975lff.88.1546338285475; Tue, 01 Jan 2019 02:24:45 -0800 (PST) MIME-Version: 1.0 From: Aditya Toshniwal Date: Tue, 1 Jan 2019 15:54:34 +0530 Message-ID: Subject: [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally To: pgadmin-hackers Content-Type: multipart/mixed; boundary="0000000000003631a6057e62f077" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000003631a6057e62f077 Content-Type: multipart/alternative; boundary="00000000000036319f057e62f075" --00000000000036319f057e62f075 Content-Type: text/plain; charset="UTF-8" Hi Hackers, Some of the windows users are facing the error as "The application server could not be contacted" while starting pgAdmin4. The startup logs had nothing. Just that the application timed out. I was able to simulate the issue for sometime when I started my windows machine, but later it did not throw any error and worked fine. It turned out that due to the slowness of the Windows OS initially the application took time to setup which was longer than the app start timeout - 30secs and so, timed out. In the attached patch, I have increased the timeout to 90secs (difficult to figure out the standard timeout). Plus, I have changed the messages at intervals when the app is starting so that it does not look stuck. Kindly review. -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB Software Solutions | Pune "Don't Complain about Heat, Plant a tree" --00000000000036319f057e62f075 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

<= span style=3D"font-family:verdana,sans-serif">Some of the windows users are facing the error as "The=C2= =A0application=C2=A0se= rver=C2=A0could not be contacted" while starting pgAdmin4. The st= artup logs had nothing. Just that the application timed out.<= /div>
I was able to simulate the issue for sometime when I started my windows = machine, but later it did not throw any error and worked fine.
It turned out that due to the slowness of the Windows OS initially the= application took time to setup which was longer than the app start timeout= - 30secs and so, timed out.
In the attached patch, I have= increased the timeout to 90secs (difficult to figure out the standard time= out). Plus, I have changed the messages at intervals when the app is starti= ng so that it does not look stuck.

K= indly review.
--
Thanks and Regards,
Aditya Toshniwal<= /span>
Software Engin= eer |=C2=A0EnterpriseDB Software Solutions |=C2=A0Pune
"Don&#= 39;t Complain about Heat, Plant a tree"
--00000000000036319f057e62f075-- --0000000000003631a6057e62f077 Content-Type: application/octet-stream; name="timeout.splash.patch" Content-Disposition: attachment; filename="timeout.splash.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jqdlrg6e0 ZGlmZiAtLWdpdCBhL3J1bnRpbWUvcGdBZG1pbjQuY3BwIGIvcnVudGltZS9wZ0FkbWluNC5jcHAK aW5kZXggNDcxY2I1MGYuLmI5YTVhMjE5IDEwM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PSBmYWxzZTsKIAogICAgIExvZ2dlcjo6 R2V0TG9nZ2VyKCktPkxvZygiVGhlIHNlcnZlciBzaG91bGQgYmUgdXAsIHdlJ2xsIGF0dGVtcHQg dG8gY29ubmVjdCBhbmQgZ2V0IGEgcmVzcG9uc2UuIFBpbmcgdGhlIHNlcnZlciIpOwpAQCAtMzY1 LDYgKzM2NywxNyBAQCBpbnQgbWFpbihpbnQgYXJnYywgY2hhciAqIGFyZ3ZbXSkKICAgICAgICAg ICAgIGJyZWFrOwogICAgICAgICB9CiAKKyAgICAgICAgaWYoUVRpbWU6OmN1cnJlbnRUaW1lKCkg Pj0gbWlkVGltZTEpCisgICAgICAgIHsKKyAgICAgICAgICAgIGlmKFFUaW1lOjpjdXJyZW50VGlt ZSgpIDwgbWlkVGltZTIpIHsKKyAgICAgICAgICAgICAgICBzcGxhc2gtPnNob3dNZXNzYWdlKFFT dHJpbmcoUVdpZGdldDo6dHIoIlRha2luZyBsb25nZXIgdGhhbiB1c3VhbC4uLiIpKSwgUXQ6OkFs aWduQm90dG9tIHwgUXQ6OkFsaWduQ2VudGVyKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IGVsc2UKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzcGxhc2gtPnNob3dNZXNzYWdl KFFTdHJpbmcoUVdpZGdldDo6dHIoIkFsbW9zdCB0aGVyZS4uLiIpKSwgUXQ6OkFsaWduQm90dG9t IHwgUXQ6OkFsaWduQ2VudGVyKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCiAgICAgICAg IGRlbGF5KDIwMCk7CiAgICAgfQogCg== --0000000000003631a6057e62f077--