<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:11:36 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[OKAPI-583] Possible leak of SQL connections/sessions</title>
                <link>https://folio-org.atlassian.net/browse/OKAPI-583</link>
                <project id="10137" key="OKAPI">Okapi</project>
                    <description>&lt;p&gt;The issue was seen with install calls (new tenants each time). RMB-based modules could play role as well .. This is because tenant init calls are used during install as well.&lt;/p&gt;</description>
                <environment></environment>
        <key id="54035">OKAPI-583</key>
            <summary>Possible leak of SQL connections/sessions</summary>
                <type id="10001" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium">Bug</type>
                                            <priority id="10002" iconUrl="https://dev.folio.org/assets/jira-priority/jira-p3.svg">P3</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Duplicate</resolution>
                                                        <assignee accountid="5f8314dfbdef80006f6f572d">Adam Dickmeiss</assignee>
                                                                <reporter accountid="5f8314dfbdef80006f6f572d">Adam Dickmeiss</reporter>
                                    <labels>
                            <label>back-end</label>
                            <label>ci</label>
                            <label>core</label>
                            <label>sprint36</label>
                    </labels>
                <created>Wed, 21 Mar 2018 13:37:30 +0000</created>
                <updated>Fri, 3 Jan 2020 14:21:02 +0000</updated>
                            <resolved>Wed, 11 Apr 2018 13:10:21 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                    <timespent seconds="14400">4 hours</timespent>
                                <comments>
                                                            <comment id="126247" author="5f8314dfbdef80006f6f572d" created="Wed, 21 Mar 2018 13:40:34 +0000"  >&lt;p&gt;error_log.txt as reported by &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5accde1bba87e92b4b215b04&quot; class=&quot;user-hover&quot; rel=&quot;5accde1bba87e92b4b215b04&quot; data-account-id=&quot;5accde1bba87e92b4b215b04&quot; accountid=&quot;5accde1bba87e92b4b215b04&quot; rel=&quot;noreferrer&quot;&gt;Chason Luis&lt;/a&gt;&lt;/p&gt;</comment>
                                                            <comment id="126249" author="5f8314dfbdef80006f6f572d" created="Thu, 5 Apr 2018 11:10:38 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=5accde1bba87e92b4b215b04&quot; class=&quot;user-hover&quot; rel=&quot;5accde1bba87e92b4b215b04&quot; data-account-id=&quot;5accde1bba87e92b4b215b04&quot; accountid=&quot;5accde1bba87e92b4b215b04&quot; rel=&quot;noreferrer&quot;&gt;Chason Luis&lt;/a&gt; wrote:&lt;br/&gt;
I found a problem when I install modules for tenants. I did this operation with the okapi&apos;s proxy service:`/_/proxy/tenants/&lt;/p&gt;
{tenant_id}
&lt;p&gt;/install`.  I wanted to enable `mod-users/permission/login/users-bl` to different tenants. At first , the `install` service runs well . But after doing this for several tenants. The connections of postgresql seems not enough. And the log reports something like: `3:39:29 ERROR PostgreSQLConnection Error with message -&amp;gt; ErrorMessage(fields=Map(Line -&amp;gt; 779, File -&amp;gt; postinit.c, SQLSTATE -&amp;gt; 53300, Routine -&amp;gt; InitPostgres, V -&amp;gt; FATAL, Message -&amp;gt; &#24050;&#20445;&#30041;&#30340;&#36830;&#25509;&#20301;&#32622;&#20026;&#25191;&#34892;&#38750;&#22797;&#21046;&#35831;&#27714;&#30340;&#36229;&#32423;&#29992;&#25143;&#39044;&#30041;, Severity -&amp;gt; &#33268;&#21629;&#38169;&#35823;))`&lt;br/&gt;
The sqlState is 53300&lt;/p&gt;</comment>
                                                            <comment id="126251" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Mon, 9 Apr 2018 06:56:07 +0000"  >&lt;p&gt;i am looking into rmb to see if i see this&lt;/p&gt;</comment>
                                                            <comment id="126253" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Mon, 9 Apr 2018 07:39:14 +0000"  >&lt;p&gt;i activated 12 tenants locally &lt;/p&gt;

&lt;p&gt;running &lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;select max_conn,used,res_for_super,max_conn-used-res_for_super res_for_normal 
from 
  (select count(*) used from pg_stat_activity) A,
  (select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) B,
  (select setting::int max_conn from pg_settings where name=$$max_connections$$) C
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;yielded:&lt;/p&gt;

&lt;p&gt;max_connections: 100	&lt;br/&gt;
used: 4&lt;br/&gt;
reserved for super user: 3&lt;br/&gt;
reserved for normal: 93&lt;/p&gt;

&lt;p&gt;looking into the used (4) - 3 o them belonged to pgAdmin (postgres sql client) and only one to rmb. so i dont yet believe this is comming from an rmb storage module but i will continue looking. biz modules should not have any db access&lt;/p&gt;</comment>
                                                            <comment id="126255" author="712020:32bb56ac-50e7-4787-b4af-ed3089d9401c" created="Mon, 9 Apr 2018 08:35:41 +0000"  >&lt;p&gt;to check the connections:&lt;/p&gt;


&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;  SELECT
    pid,
    datname,
    usename,
    application_name,
    client_addr,
    to_char(backend_start, &apos;YYYY-MM-DD HH24:MI:SS TZ&apos;) AS backend_start,
    state,
    wait_event_type || &apos;: &apos; || wait_event AS wait_event,
    pg_blocking_pids(pid) AS blocking_pids,
    query,
    to_char(state_change, &apos;YYYY-MM-DD HH24:MI:SS TZ&apos;) AS state_change,
    to_char(query_start, &apos;YYYY-MM-DD HH24:MI:SS TZ&apos;) AS query_start
FROM
    pg_stat_activity
ORDER BY pid
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;you should see only one connection that is active usually, while a query is running it will be in active state, when the query completes it will be in idle state although the connection will remain open.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="56884">RMB-154</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10003">
                    <name>Relates</name>
                                            <outwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="54036">OKAPI-561</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="42055" name="error_log.txt" size="157816" author="5f8314dfbdef80006f6f572d" created="Wed, 21 Mar 2018 13:39:51 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|hzyecv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 9 Apr 2018 06:56:07 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>