mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Change access token validity and remove logging
The access token renewal on GCE is not what we expected. The metadata server always returns the same token as long as it is valid for 1699 to 3599 seconds and rolls over to the next token on its own schedule. Calling refresh on the GoogleCredential has no effect. We were caching the token for 30 min (1800 seconds), so in a rare case where we "refreshed" the token while its expiry is between 1699 and 1800 seconds, we will cache the token for longer than its validity. [] shorted the caching period to 10 min and added logging, which proved to be working. We no longer need the log any more now that the root cause has been identified. Also changed the cache period to 15 min (900 seconds) which should still be good. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=208888170
This commit is contained in:
parent
301301cafe
commit
fc75e08061
4 changed files with 18 additions and 28 deletions
|
@ -77,7 +77,7 @@ public class RelayHandler<I> extends SimpleChannelInboundHandler<I> {
|
|||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
|
||||
if (cause instanceof OverQuotaException) {
|
||||
logger.atWarning().withCause(cause).log(
|
||||
"Channel %s closed due to quota exceeded", ctx.channel());
|
||||
"Channel %s closed due to quota exceeded.", ctx.channel());
|
||||
ChannelFuture unusedFuture = ctx.close();
|
||||
} else {
|
||||
ctx.fireExceptionCaught(cause);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue