Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

A small question:

How do we delay starting dbremote until the dbsrv10 is ready to accept requests ?

We have setup dbeng10 and dbremote to start in the correct order as services in linux (Ubuntu 10.04.2 LTS). But when the system boots, dbeng10 is started correctly, but the server takes 5-10 seconds until it's ready to accept requests.

The dbremote process is started directly after dbeng10 and then fails with a connection error (because the db is not yet ready...)

Is there a way to delay the start of dbremote until the database server is ready ?

Until now we just did put a "sleep 20" in the start of the dbremote service, but this then also delays starting all other services by 20 seconds.... :(

André

asked 23 Jun '11, 06:05

ASchild's gravatar image

ASchild
777222740
accept rate: 14%


Have a look at the RetryConnectionTimeout connection parameter. You should be able to set it to a reasonable value and dbremote will keep trying to connect every 0.5 seconds until either the connection is successful, the connection fails for a reason other than "database server not found," or the timeout is exceeded.

Note that you probably don't want to wait indefinitely in case your database server never does successfully start for some reason.

permanent link

answered 23 Jun '11, 08:17

Phil%20Mitchell's gravatar image

Phil Mitchell
1.9k1831
accept rate: 27%

edited 23 Jun '11, 08:24

Works fine, thanks.

(28 Jun '11, 03:21) ASchild

Use the dbsvc -rs <dep> switch to specify the SA server service name when you define your dbremote service name. This will tell Linux to not start the dbremote service until the SA server service has been started.

Alternatively you could edit the dbremote service definition in /etc/init.d to specify a dependency of your deremote service on your SQL Anywhere server service. E.g. add the name of your SA server service to the Required-Start comment line near the top of the init.d file. After making the change to the service file you will need to tell Linux to "shuffle" the start and stop order. How you do this depends on the Linux distro - e.g. use chkconfig or update-rc.d

permanent link

answered 23 Jun '11, 11:22

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297
accept rate: 41%

edited 23 Jun '11, 13:16

Our service scripts date back from sql anywhere version 9, so perhaps we should look at the new functionality ;)

Thanks

(28 Jun '11, 03:22) ASchild
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×119
×78
×40

question asked: 23 Jun '11, 06:05

question was seen: 3,081 times

last updated: 28 Jun '11, 03:22