Skip to content

Lingering Uploader thread from previous deploy after new deploy #14

@crspybits

Description

@crspybits

I just tailed logs on the server running on AWS, and see:

[2021-06-06T17:43:03.777Z] [DEBUG] [RepeatingTimer.swift:43 deinit] RepeatingTimer: deinit
[2021-06-06T17:43:33.777Z] [DEBUG] [PeriodicUploader.swift:31 schedule()] PeriodicUploader: About to run Uploader
[2021-06-06T17:43:33.777Z] [DEBUG] [DebugAlloc.swift:22 create()] [CREATE: Uploader] Created: 47972; destroyed: 47970
[2021-06-06T17:43:33.777Z] [DEBUG] [Uploader.swift:104 deinit] Uploader: deinit
[2021-06-06T17:43:33.777Z] [DEBUG] [DebugAlloc.swift:27 destroy()] [DESTROY: Uploader] Created: 47972; destroyed: 47971
[2021-06-06T17:43:33.777Z] [DEBUG] [Uploader.swift:141 run()] Attempting to get lock...
[2021-06-06T17:43:33.784Z] [ERROR] [Database.swift:52 init(showStartupInfo:)] Failure connecting to mySQL server syncserver-dev2.<SNIP>.us-west-2.rds.amazonaws.com: Failure: 2005 Unknown MySQL server host 'syncserver-dev2.<SNIP>.us-west-2.rds.amazonaws.com' (0)
[2021-06-06T17:43:33.784Z] [INFO] [Database.swift:97 close()] CLOSING DB CONNECTION: opened: 47973; closed: 47973
[2021-06-06T17:43:33.784Z] [ERROR] [PeriodicUploader.swift:38 schedule()] failedConnectingDatabase

This is ongoing-- from a running process, not stale logs. Note that it is referencing the mySQL server: syncserver-dev2.<SNIP>.us-west-2.rds.amazonaws.com. This is a stale reference. The AWS mySQL RDS instance was only present for a brief interval while I was migrating. It is no longer running and thus it's not surprising that an access to it is failing.

What is surprising is that there is a reference to this old server at all. The currently deployed Server.json configuration does not contain a reference to this mySQL RDS instance.

I believe this is occurring as a result of:

a) The manner in which I'm deploying updates to the server using AWS Elastic Beanstalk tools, and
b) The new architecture of the server which runs a timer-based thread to do processing of deferred uploads.

Somehow that timer-based thread is surviving the deploy of the new server at least in some cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions