Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very slow windows server process/service start #485

Closed
dpogorzelski opened this issue Sep 25, 2020 · 4 comments
Closed

Very slow windows server process/service start #485

dpogorzelski opened this issue Sep 25, 2020 · 4 comments
Labels
type: question Request for information or clarification.

Comments

@dpogorzelski
Copy link

Question

When running cloud_sql_proxy as a windows service the startup time is very slow, to the point where windows fails to start the service with message:
Error 1053 the service did not respond to the start or control request in a timely fashion

The service is created via:

New-Service -Name "test" -BinaryPathName "C:\cloud_sql_proxy.exe -verbose=false -instances=`"$env:SQL_INSTANCES`"" -StartupType Auto

When using a service wrapper such as nssm the service starts instantly from windows perspective but that's only because there is nssm in front, the actual cloud_sql_proxy executable takes 1-2min to be ready and receive connections.

@dpogorzelski dpogorzelski added the type: question Request for information or clarification. label Sep 25, 2020
@dpogorzelski
Copy link
Author

Official Windows server 2012 image was used in this testing in GCE

@Carrotman42
Copy link
Contributor

Back in the day the Proxy started up instantly, but now it does a bunch of network activity to verify the command line arguments before allowing connections. Still, 1-2 minutes sounds unexpected to me personally.

Do you have lots of instances in your list or something?

What logs come out of the Proxy process during this time?

@kurtisvg
Copy link
Contributor

When running cloud_sql_proxy as a windows service the startup time is very slow, to the point where windows fails to start the service with message:

The binary doesn't work directly as a service on Windows. This is because Windows services require specific support which the proxy doesn't implement (yet: #277). Until then, you'll have to use a tool such as nssm to run it as as service.

I would agree that the 1-2 minutes on startup time is excessive. In addition to providing logs, can you run the proxy manually and see if you still see this start up time when just running the proxy manually?

@shubha-rajan
Copy link
Contributor

Closing this stale issue. Feel free to reopen if you'd like to follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification.
Projects
None yet
Development

No branches or pull requests

4 participants