Tyk fails to re-connect to mongo if the mongo instance is restarted

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:22:33 +0000.
Sender:Richard Hulm.
Date:Wednesday, 12 August 2015 16:44:29 UTC+1.

Hiya,

Not sure if this is something immediately resolvable or just something that would be nice to include in the roadmap, but the dashboard doesn’t seem to handle reconnecting the mongo very well?

If I leave the gateway and dashboard running, but restart the mongo instance they’re using, they dont seem to reconnect without restarting Tyk.

Would it be possible to make them re-open or retry the connection (maybe even a configurable number of retries?) without requiring a restart?

Cheers,

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 1 September 2015 12:44:49 UTC+1.

Dammit.

Host manager is the under-appreciated third child of the Tyk stack and hasn’t been updated.

Will go on the pile for the next point release :-/

Thanks for flagging it up!

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/8ed83734-b329-4d06-8df8-c05b9e4edb2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 1 September 2015 21:51:40 UTC+1.

This is fixed now and will be in the 1.8.1 release along with the logger changes in dashboard :slight_smile:
Cheers,
Martin

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 12 August 2015 17:58:35 UTC+1.

Hi Richard,

We just pushed a fix to the Tyk master branch for this, connectons will sleep for 5 seconds and then retry. We’ve also updated the Dashboard master bracnch with reconnection logic so that it can handle a restart better. These will be shipped with 1.8 / 0.9.6.

We’ve always deployed tyk with a MongoDB + Replica set failover, so even when we had a change to our DB infrastructure it never affected connectivity because of the failover. Oops :-/

Thanks for pointing it out, as I said, it will be fixed in the next release, which is close…

Cheers,
Martin

  • show quoted text -

Imported Google Group message.
Sender:Richard Hulm.
Date:Thursday, 20 August 2015 15:39:45 UTC+1.

Ah makes sense!

Thanks for the quick reply (I only just noticed you’d replied I had to admit!). We’ve worked round it for now just by writing a script which restarts Tyk whenever our MongoDb config is updated, which felt wrong…

Look forward to the new release though

Cheers,

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Tuesday, 1 September 2015 12:42:16 UTC+1.

Hi Martin,

Just updated to 1.8 and this seems to work well in the gateway and the dashboard, but not the host-manager?

I get the following when issuing a reload to the gateway when MongoDb has gone down and then come back

time=“2015-09-01T12:17:35+01:00” level=info msg=“Restart request received, restarting tyk muxers”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Syncronising active API configurations”
time=“2015-09-01T12:17:35+01:00” level=error msg=“Failure in org lookup: EOF”
time=“2015-09-01T12:17:35+01:00” level=error msg=“Something went wrong, couldn’t get Api list”
time=“2015-09-01T12:17:35+01:00” level=error msg=EOF
time=“2015-09-01T12:17:35+01:00” level=error msg=“Something went wrong, couldn’t get Api list”
time=“2015-09-01T12:17:35+01:00” level=error msg=EOF
time=“2015-09-01T12:17:35+01:00” level=error msg=“Failed to get API list”
time=“2015-09-01T12:17:35+01:00” level=error msg=“Failure in org lookup: EOF”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Found New API’s: 0”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Updated APi’s: 0”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Removed APi’s: 3”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Reloading NGinX”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Reloading NginX settings”
time=“2015-09-01T12:17:35+01:00” level=info msg=“Reload successful”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Restart request received, restarting tyk muxers”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Syncronising active API configurations”
time=“2015-09-01T12:18:56+01:00” level=error msg=“Failure in org lookup: EOF”
time=“2015-09-01T12:18:56+01:00” level=error msg=“Something went wrong, couldn’t get Api list”
time=“2015-09-01T12:18:56+01:00” level=error msg=EOF
time=“2015-09-01T12:18:56+01:00” level=error msg=“Something went wrong, couldn’t get Api list”
time=“2015-09-01T12:18:56+01:00” level=error msg=EOF
time=“2015-09-01T12:18:56+01:00” level=error msg=“Failed to get API list”
time=“2015-09-01T12:18:56+01:00” level=error msg=“Failure in org lookup: EOF”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Found New API’s: 0”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Updated APi’s: 0”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Removed APi’s: 1”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Reloading NGinX”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Reloading NginX settings”
time=“2015-09-01T12:18:56+01:00” level=info msg=“Reload successful”

Any ideas?

Cheers,

On Wednesday, 12 August 2015 17:58:35 UTC+1, Martin Buhr wrote:

  • show quoted text -

Imported Google Group message.
Sender:Richard Hulm.
Date:Tuesday, 1 September 2015 12:44:49 UTC+1.

Dammit.

Host manager is the under-appreciated third child of the Tyk stack and hasn’t been updated.

Will go on the pile for the next point release :-/

Thanks for flagging it up!

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/8ed83734-b329-4d06-8df8-c05b9e4edb2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Imported Google Group message.
Sender:Richard Hulm.
Date:Tuesday, 1 September 2015 21:51:40 UTC+1.

This is fixed now and will be in the 1.8.1 release along with the logger changes in dashboard :slight_smile:
Cheers,
Martin

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 3 September 2015 11:03:55 UTC+1.

Excellent thanks Martin.

Would you mind replying on here or notifying me/us when 1.8.1 is released so we can update to it?

Cheers,

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Thursday, 3 September 2015 13:38:44 UTC+1.

We pushed 1.8.1 just now :slight_smile:

Docker images are building…

Cheers,
Martin

  • show quoted text -