-
Notifications
You must be signed in to change notification settings - Fork 72
pause and resume of proxy with inactivity timeout causes proxy to be immediately deleted after successful resume #101
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
example case in testing backend support for pause and resume on snowpark container services service suspend resume.
if i have a inactivity timeout set in shiny proxy for say 5 minutes.
i pause my app/proxy. service in spcs suspends
go back to app screen or admin screen.
watch inactivity timeout exceed 5 minutes.
app remains in paused state not deleted as expected.
open the app again, it resumes as expected.
immediately app is deleted due to inactivity.
heartbeat-rate: 10000
heartbeat-timeout: 300000
suggested fix.
ProxyService.java
import eu.openanalytics.containerproxy.service.heartbeat.HeartbeatService;
@Inject
@Lazy
private HeartbeatService heartbeatService;
public Command resumeProxy(Authentication user, Proxy proxy, Map<String, String> parameters) {
...
Proxy result = startOrResumeProxy(user, parameterizedProxy, null);
if (result != null) {
slog.info(result, "Proxy resumed");
applicationEventPublisher.publishEvent(new ProxyResumeEvent(result));
// Reset heartbeat so inactivity timer does not immediately stop the proxy after resume
heartbeatService.heartbeatReceived(HeartbeatService.HeartbeatSource.INTERNAL, result, null);
// final check to see if the app was stopped
cleanupIfPendingAppWasStopped(result);
}
...
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working