public inbox for [email protected]
help / color / mirror / Atom feed[patch][pgAdmin4] Windows error - The application server could not be contacted occasionally
2+ messages / 2 participants
[nested] [flat]
* [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally
@ 2019-01-01 10:24 Aditya Toshniwal <[email protected]>
2019-01-02 11:57 ` Re: [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally Dave Page <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Toshniwal @ 2019-01-01 10:24 UTC (permalink / raw)
To: pgadmin-hackers
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"
Attachments:
[application/octet-stream] timeout.splash.patch (1.5K, 3-timeout.splash.patch)
download | inline diff:
diff --git a/runtime/pgAdmin4.cpp b/runtime/pgAdmin4.cpp
index 471cb50f..b9a5a219 100644
--- a/runtime/pgAdmin4.cpp
+++ b/runtime/pgAdmin4.cpp
@@ -347,12 +347,14 @@ int main(int argc, char * argv[])
Logger::GetLogger()->Log(QString(QWidget::tr("Application Server URL: %1")).arg(appServerUrl));
// Read the server connection timeout from the registry or set the default timeout.
- int timeout = settings.value("ConnectionTimeout", 30).toInt();
+ int timeout = settings.value("ConnectionTimeout", 90).toInt();
// Now the server should be up, we'll attempt to connect and get a response.
// We'll retry in a loop a few time before aborting if necessary.
QTime endTime = QTime::currentTime().addSecs(timeout);
+ QTime midTime1 = QTime::currentTime().addSecs(timeout/3);
+ QTime midTime2 = QTime::currentTime().addSecs(timeout*2/3);
bool alive = false;
Logger::GetLogger()->Log("The server should be up, we'll attempt to connect and get a response. Ping the server");
@@ -365,6 +367,17 @@ int main(int argc, char * argv[])
break;
}
+ if(QTime::currentTime() >= midTime1)
+ {
+ if(QTime::currentTime() < midTime2) {
+ splash->showMessage(QString(QWidget::tr("Taking longer than usual...")), Qt::AlignBottom | Qt::AlignCenter);
+ }
+ else
+ {
+ splash->showMessage(QString(QWidget::tr("Almost there...")), Qt::AlignBottom | Qt::AlignCenter);
+ }
+ }
+
delay(200);
}
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally
2019-01-01 10:24 [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally Aditya Toshniwal <[email protected]>
@ 2019-01-02 11:57 ` Dave Page <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Dave Page @ 2019-01-02 11:57 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, applied.
On Tue, Jan 1, 2019 at 10:24 AM Aditya Toshniwal
<[email protected]> wrote:
>
> 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"
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-01-02 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 10:24 [patch][pgAdmin4] Windows error - The application server could not be contacted occasionally Aditya Toshniwal <[email protected]>
2019-01-02 11:57 ` Dave Page <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox