JBoss Apache Configuration Issues

≡放荡痞女 提交于 2020-02-08 02:23:08

问题


I have the following Apache configuration. I have issue like DB connection goes for toss. I have database JNDI pool entry in my web.xml for the datasource configured in standalone.xml

<resource-ref id="ResourceRef_xxxxxxxxxxx7711">
    <res-ref-name>jdbc/pcbDB</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <jndi-name>java:/jdbc/pcbDB</jndi-name>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

standlone.xml configuration for datasource

<datasource jndi-name="java:/jdbc/pcbDB" pool-name="pcbdb" enabled="true">
                    <connection-url>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))</connection-url>
                    <driver>com.oracle</driver>
                    <pool>
                        <min-pool-size>3</min-pool-size>
                        <max-pool-size>5</max-pool-size>
                    </pool>
.....
</datasource>

Apache Configuration (defaults);

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>


<IfModule worker.c>
StartServers         4
MaxClients         300
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

5 concurrent click on one .war module makes java:/jdbc/pcbDB makes not accessible because of <max-pool-size>5</max-pool-size>

I will be correcting the code for the same.

My concern is when this happens, afterwards Apache needs to be restarted. Is that how it should be....

Else I can fix Apache config. by correcting <IfModule prefork.c> and <IfModule worker.c>

Please advise......


回答1:


Considering the problems posted here & the same under link

Apache Configuration Issue with JBoss [Bad Request from JBoss]

I had reconfigured datasource poll counts and flush-strategy.

            <pool>
                <min-pool-size>11</min-pool-size>
                <max-pool-size>20</max-pool-size>
                <use-strict-min>true</use-strict-min>
                <flush-strategy>FailingConnectionOnly</flush-strategy>
            </pool>

Hope <use-strict-min> goes well.



来源:https://stackoverflow.com/questions/31912652/jboss-apache-configuration-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!