<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Linux  - dbsrv16 terminates unexpectedly in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848906#M4879749</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;What is the maximum number of databases I can run on a single machine?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To cite a Jeff Albion answer from a comment on &lt;A href="http://sqlanywhere-forum.sap.com/questions/7756#7768"&gt;that other FAQ&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Q: Is there a technical limit as to the number of database engines on one physical server, i.e. could one machine run 200 database engines each running 250 databases thus running 5000 databases in total?  &lt;/P&gt;
&lt;P&gt;A: No, you're only limited by the total OS memory constraints for all of the database servers in this scenario. Eventually you will get into a situation where we can't allocate all of the database start-up cache/worker threads (due to lack of resources) on one of the database servers.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can't tell on the reported error, however, running 50 instances will certainly have a deep impact on resource using/sharing compared to one instance with 50 databases in total as the latter would apparently share resources between the databases "by design". Nevertheless, as you say, that would not allow different TCP/IP ports for each database.&lt;/P&gt;</description>
    <pubDate>Fri, 06 Feb 2015 06:43:06 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2015-02-06T06:43:06Z</dc:date>
    <item>
      <title>Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaq-p/13848904</link>
      <description>&lt;P&gt;I have a linux machine that runs 50 instances of the same 50Mb database.&lt;/P&gt;
&lt;P&gt;cmd for each looks like this:&lt;/P&gt;
&lt;PRE class="codehilite"&gt;&lt;CODE&gt;dbsrv16 -m -ud -c 64M -ch 256M "-x TCPIP(port=2001)" "-xs HTTP(port=2501)" -ti 0 -tl 0 -on 10m -oe /peopleweb/db*NN*/errors.txt -o /peopleweb/db*NN*/console.txt -n pw*NN* /peopleweb/db*NN*/PW16_pw.db


&lt;P&gt;With &lt;EM&gt;NN&lt;/EM&gt; starting at 01 up to 50&lt;/P&gt;
&lt;P&gt;These databases are presently all just idling.  No workload.  But between 2-5 hours, a random one would just stop running.  Upon inspecting the /var/log folder in my Ubuntu server, I came across the following in the &lt;STRONG&gt;apport.log&lt;/STRONG&gt; file:&lt;/P&gt;
&lt;/CODE&gt;&lt;PRE class="codehilite"&gt;&lt;CODE&gt;&lt;CODE&gt;ERROR: apport (pid 4949) Fri Feb  6 03:40:08 2015: called for pid 2985, signal 6, core limit 0

ERROR: apport (pid 4949) Fri Feb  6 03:40:08 2015: executable: /opt/sqlanywhere16/bin64/dbsrv16     (command line "dbsrv16 -m -ud -c 64M -ch 256M -x\\ TCPIP(port=2029) -xs\\ HTTP(port=2529) -ti 0 -tl 0 -on 10m -oe /peopleweb/db29/errors.txt -o /peopleweb/db29/console.txt -n pw29 /peopleweb/db29/PW16_pw.db")

ERROR: apport (pid 4949) Fri Feb  6 03:40:08 2015: is_closing_session(): no DBUS_SESSION_BUS_ADDRESS in environment

ERROR: apport (pid 4949) Fri Feb  6 03:40:08 2015: apport: report /var/crash/_opt_sqlanywhere16_bin64_dbsrv16.1002.crash already exists and unseen, doing nothing to avoid disk usage DoS


&lt;P&gt;Any idea what could cause this, or where I should start looking?&lt;/P&gt;
&lt;P&gt;What is the maximum number of databases I can run on a single machine?&lt;/P&gt;
&lt;P&gt;I don't want to run a single server with multiple databases as each should listen on a different port.&lt;/P&gt;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Feb 2015 22:52:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaq-p/13848904</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-05T22:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848906#M4879749</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;What is the maximum number of databases I can run on a single machine?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To cite a Jeff Albion answer from a comment on &lt;A href="http://sqlanywhere-forum.sap.com/questions/7756#7768"&gt;that other FAQ&lt;/A&gt;:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Q: Is there a technical limit as to the number of database engines on one physical server, i.e. could one machine run 200 database engines each running 250 databases thus running 5000 databases in total?  &lt;/P&gt;
&lt;P&gt;A: No, you're only limited by the total OS memory constraints for all of the database servers in this scenario. Eventually you will get into a situation where we can't allocate all of the database start-up cache/worker threads (due to lack of resources) on one of the database servers.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I can't tell on the reported error, however, running 50 instances will certainly have a deep impact on resource using/sharing compared to one instance with 50 databases in total as the latter would apparently share resources between the databases "by design". Nevertheless, as you say, that would not allow different TCP/IP ports for each database.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 06:43:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848906#M4879749</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2015-02-06T06:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848907#M4879750</link>
      <description>&lt;P&gt;I assume there's nothing helpful in either diagnostic log file -oe /peopleweb/db&lt;EM&gt;NN&lt;/EM&gt;/errors.txt -o /peopleweb/db&lt;EM&gt;NN&lt;/EM&gt;/console.txt&lt;/P&gt;
&lt;P&gt;I also assume you know the implications of -m (and it probably has nothing to do with this symptom)&lt;/P&gt;
&lt;P&gt;Generally speaking, -tl 0 is a very bad idea (unlike -ti 0 which is often a requirement). The -tl 0 option essentially tells the server to never drop dead/defunct connections, and I've never seen a situation where that is desirable... but again, it probably has nothing to do with this symptom.&lt;/P&gt;
&lt;P&gt;When you say "stop running" do you mean "crashes" or do you mean "stops responding to requests"?&lt;/P&gt;
&lt;P&gt;You may want to call SAP Tech Support... AFAIK there's not a lot of Ubuntu apport debugging expertise on this forum.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 09:09:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848907#M4879750</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2015-02-06T09:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848908#M4879751</link>
      <description>&lt;P&gt;Thank you Breck.  The -tl0 is a relic from our Client/Server application.  Will take that out.&lt;/P&gt;
&lt;P&gt;The database simply crashes.  Dies. Nothing in the two files either.&lt;/P&gt;
&lt;P&gt;Thanks for the advice.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 10:25:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848908#M4879751</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-06T10:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848905#M4879748</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;CODE&gt;called for pid 2985, signal 6, core limit 0&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is indicating that the database server process (pid 2985) received a &lt;A href="http://pubs.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html"&gt;signal 6 (SIGABRT)&lt;/A&gt;. SQL Anywhere will typically issue a SIGABRT during a database assertion. (See &lt;A href="https://service.sap.com/sap/support/notes/1958942"&gt;KBA 1958942&lt;/A&gt; - Error: "Assertion failed: 123456" / SQLCODE -301 "Internal Database Error" - Handling an Assertion Failure)&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Any idea what could cause this, or where I should start looking?
... Nothing in the two files either.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just to confirm the scenario: so for two hours, the database server was running, checkpointing, etc. and then crashed with no message in the console log (&lt;CODE&gt;/peopleweb/dbNN/console.txt&lt;/CODE&gt;) or error log (&lt;CODE&gt;/peopleweb/dbNN/errors.txt&lt;/CODE&gt;)? We will likely need to take a look at the core file for the crashing process in &lt;A href="http://support.sap.com/"&gt;SAP Support&lt;/A&gt; to understand what's happening in this situation further.&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;Typically when SQL Anywhere crashes, we have a signal handler that attempts to write out a core file to the current working directory of the database server (using the default &lt;CODE&gt;core_pattern&lt;/CODE&gt;). However, since you are using &lt;A href="http://dcx.sap.com/index.html#sa160/en/dbadmin/ud-database-dbengine.html"&gt;-ud&lt;/A&gt; (or if you had used &lt;A href="http://dcx.sap.com/index.html#sa160/en/dbadmin/dbspawn-spawn-dbutilities.html"&gt;dbspawn&lt;/A&gt;), we are following standard &lt;A href="https://en.wikipedia.org/wiki/Daemon_%28computing%29#Creation"&gt;UNIX daemon methodology&lt;/A&gt; by setting the current working directory to root "/", so no core file will be created there (likely due to permissions that the process is running under).&lt;/P&gt;
&lt;P&gt;Under these situations to generate a core file you must either:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Prevent the database servers from running as a daemon (do not use -ud or do not use dbspawn) and run them at the command line instead&lt;/LI&gt;
&lt;LI&gt;Run the server as a user which has permissions to write to the root directory (not advisable, but perhaps okay in a contained test environment)&lt;/LI&gt;
&lt;LI&gt;Change the configuration file &lt;CODE&gt;/proc/sys/kernel/core_pattern&lt;/CODE&gt; on Linux to cause the core files to be written into a different directory.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;In this case (Ubuntu), &lt;CODE&gt;core_pattern&lt;/CODE&gt; defaults to &lt;CODE&gt;|/usr/share/apport/apport %p %s %c&lt;/CODE&gt;, which passes the core off to &lt;A href="https://wiki.ubuntu.com/Apport"&gt;apport&lt;/A&gt; to generate. You will likely need to &lt;A href="https://wiki.ubuntu.com/Apport"&gt;enable and configure apport&lt;/A&gt; to store the core files correctly so we can examine them later. Typically core files from apport are stored in &lt;CODE&gt;/var/crash/&lt;/CODE&gt; and you may have to configure &lt;A href="http://man7.org/linux/man-pages/man5/core.5.html"&gt;RLIMIT_CORE&lt;/A&gt;.&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;For more information about SQL Anywhere and core files, and to understand which files we will need to collect in technical support to analyze the core files for more information, see the following KBAs:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://service.sap.com/sap/support/notes/2075516"&gt;KBA 2075516&lt;/A&gt; - What to do when encountering a SQL Anywhere database crash (core file) on Linux&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://service.sap.com/sap/support/notes/2075551"&gt;KBA 2075551&lt;/A&gt; - How To Collect Core Files on Linux for SQL Anywhere Processes during Hangs and Crashes&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://service.sap.com/sap/support/notes/2114328"&gt;KBA 2114328&lt;/A&gt; - How To Collect Required Linux System Libraries to Analyze Linux Core Files for SQL Anywhere&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 06 Feb 2015 11:26:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848905#M4879748</guid>
      <dc:creator>jeff_albion</dc:creator>
      <dc:date>2015-02-06T11:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848909#M4879752</link>
      <description>&lt;P&gt;Thank you Jeff.  Will go through this and revert back to you.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848909#M4879752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-06T20:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848910#M4879753</link>
      <description>&lt;P&gt;Jeff&lt;/P&gt;
&lt;P&gt;I have located the core files in /var/crash&lt;/P&gt;
&lt;P&gt;/var/crash/_opt_sqlanywhere16_bin64_dbsrv16.1002.crash&lt;/P&gt;
&lt;P&gt;Is this what you're referring to?&lt;/P&gt;
&lt;P&gt;Could this be submitted to SAP for analysis?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 15:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848910#M4879753</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-11T15:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Linux  - dbsrv16 terminates unexpectedly</title>
      <link>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848911#M4879754</link>
      <description>&lt;P&gt;Yes, that sounds like the core file we would need to collect, generated from apport.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Could this be submitted to SAP for analysis?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, for sure. But as mentioned above, we will also need to collect the system libraries from the crashing system in order to open the core file for a detailed analysis - can you &lt;A href="http://support.sap.com/"&gt;open an incident with SAP Support&lt;/A&gt;? &lt;/P&gt;
&lt;P&gt;Also depending on how big the core file is, you may have to upload it to us via FTP - we can provide the details on how to do this via the incident.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 16:37:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/linux-dbsrv16-terminates-unexpectedly/qaa-p/13848911#M4879754</guid>
      <dc:creator>jeff_albion</dc:creator>
      <dc:date>2015-02-11T16:37:40Z</dc:date>
    </item>
  </channel>
</rss>

