In order to post questions, answers, or comments, you now need a validated email address. Details on how to validate your address are in the FAQ.

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 Jun 23 '11 at 06:05

ASchild's gravatar image

ASchild
777222740


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.

answered Jun 23 '11 at 08:17

Phil%20Mitchell's gravatar image

Phil Mitchell
1.4k1326

edited Jun 23 '11 at 08:24

Works fine, thanks.

(Jun 28 '11 at 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

answered Jun 23 '11 at 11:22

Mark%20Culp's gravatar image

Mark Culp
18.2k9109212

edited Jun 23 '11 at 13:16

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

Thanks

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

Are you providing an answer to the original question, or making a comment on the question or an answer? If you are making a comment please do not post a new answer. Click "Add new comment" on the question or answer instead. If you are responding to a previous comment, click on the "reply" icon (    ) for that comment.

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 (indent for sublists):
    1. Foo
    2. Bar
  • bullet list (indent for sublists):
    * Foo
    * Bar
  • to add a line break, add two spaces to where you would like the new line to be.
  • Code blocks should be indented by 4 spaces. SQL code should begin with ":::SQL" on the first line.
  • basic HTML tags are also supported

Tags:

×105
×34
×23

Asked: Jun 23 '11 at 06:05

Seen: 1,064 times

Last updated: Jun 28 '11 at 03:22

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link: [text](http://url.com/ "title")
  • image: ![alt text](/path/img.jpg "title")
  • numbered list (indent for sublists):
    1. Foo
    2. Bar
  • bullet list (indent for sublists):
    * Foo
    * Bar
  • to add a line break, add two spaces to where you would like the new line to be.
  • Code blocks should be indented by 4 spaces. SQL code should begin with ":::SQL" on the first line.
  • basic HTML tags are also supported