We recently had an experience on an Oracle Autonomous Database where our production instance started giving us lots of errors saying:
ORA-20001: You have exceeded the maximum number of web service requests per workspace. Please contact your administrator.
After some investigation, I found a couple of interesting blog posts by Dimitri Gielis and Scott Wesley that seemed to address this exact issue.
https://dgielis.blogspot.com/2018/09/increasing-maximum-web-service-requests.html
http://www.grassroots-oracle.com/2019/03/oracle-apex-web-service-request-limit.html
As these two blog posts tell us, in a self-managed or in-house APEX installation, the page for changing the Maximum Web Service Requests parameter can be found under "Security settings -> Workspace Isolation -> Maximum Web Service Requests". We can increase the parameter there and fix the issue.
However, on the Autonomous DB these pages are not available. So the questions become: Can we change this parameter? and if so, how and where?
A further flurry of Googling and a deeper dive into the Oracle Documentation led us to the following page: https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/apex-web-services.html#GUID-DA24C605-384D-4448-B73C-D00C02F5060E
Here we see that there is an APEX instance-level parameter called MAX_WEBSERVICE_REQUESTS which can be queried and modified using the APEX_INSTANCE_ADMIN package. The default value of this parameter on an Autonomous DB is currently 50'000 outgoing requests in a rolling 24-hour period. To run this package you must be connected as the ADMIN user.
To view the current value of MAX_WEBSERVICE_REQUESTS, we can execute the following query that uses the get_parameter function.
select apex_instance_admin.get_parameter('MAX_WEBSERVICE_REQUESTS') as requestsfrom dual;
REQUESTS--------50000
To change this value, we can use the SET_PARAMETER procedure:
beginapex_instance_admin.set_parameter
('MAX_WEBSERVICE_REQUESTS', '250000'); -- increase to 250'000
commit;end;/
If we rerun the preceding query again, we now get a different result that confirms that our change has worked.
select apex_instance_admin.get_parameter('MAX_WEBSERVICE_REQUESTS') as requestsfrom dual;
REQUESTS--------250000
I hope that this blog post helps someone out there avoid the minor panic that we experienced for a short while today.
Happy APEXing to all!
i get error on excuting this command , error says invalid identifier. please help me with this situation .
ReplyDelete