Query timeout issue
I have some large queries that update databases that are
timing out before they are done. Is there a way to set the
particular query timeout to be endless?
TIMEOUT="milliseconds" = ????endless????
It is now clear, much more from your explanation than from
your query, that the business of reading the file, parsing it and
looping with cfoutput to insert the data into the database all
contribute to the bottle-neck. I am surprised by the suggestion
that reading and parsing a text file costs more time than if you
split it into smaller files.
In any case, experiment by replacing the cfoutput loop with
cfloop. (Then apply cfoutput where the pound signs occur). Also
increase the request timeout setting in the Coldfusion
Administrator. Use the getTickCount function to find out piecewise
which code blocks take the most time. Its usage is as follows
cfset beginCount = GetTickCount()>
<!--- Code block you wish to time --->
<cfset endCount = GetTickCount()>
Execution time of code block: <cfoutput>#endCount -
beginCount#</cfoutput> milliseconds
edit: "than" in place of "that"
Similar Messages
-
Can we set the query timeout value in a global control place?
hi everyone,
We use the FullTextSqlQuery class to do query stuff, but we have the query timeout issue, the query sometimes timeout, sometimes is normal. I know there is a property from Query class called Timeout, and the default
time is 15 seconds, but we have lots of code involving FullTextSqlQuery.
I want to know is there a gloabal place like the web.config or regedit or somewhere to set the timeout value?
ThanksDid you ever get an answer? I'm in the same boat...the only way I can seem to not charge tax to my wholesale clients is to set "tax never applies". But I got over 300 products...how can I do it "en mass"???
Anybody??
I tried creating a special tax code at 0% but that didn't do it either.
thanks in advance,
Scot. -
Hi,
I have a SAP query which was the following code which is causing a timeout issue when running the report, can anyone suggest how I can change the code to make it more efficent?
* This gets the sum of all labour costs on WBSEs.
clear X_COEP_WKGBTR_LAB_W.
if PRPS-OBJNR is not initial.
select sum( WKGBTR ) from COEP
into X_COEP_WKGBTR_LAB_W
where
PERIO = ZPERIODT
and
GJAHR = ZYEAR
and
KSTAR >= 'A43'
and
KSTAR =< 'A43ZZZZZZZ'
OR
KSTAR = '0005767012'
and
OBJNR = PRPS-OBJNR.
endif.
thanks
JoeHi Joe,
I see none of the Key fields were used in select query.
Create a secondary index for the table and use it in select query.
It increases the performance.
COEP~1 and COEP~2 are already existing.
select sum( WKGBTR ) from COEP
into X_COEP_WKGBTR_LAB_W
where
PERIO = ZPERIODT
and
GJAHR = ZYEAR
and
KSTAR >= 'A43'
and
KSTAR =< 'A43ZZZZZZZ'
OR
KSTAR = '0005767012'
and
OBJNR = PRPS-OBJNR
%_HINTS ORACLE 'INDEX("COEP" "COEP~1").
Thanks,
Anil -
Powerpivot Report 2010 - OLE DB or ODBC error: Query timeout expired; HYT00
0
I have report already developed by someone in powerpivot 2010 and deployed to sharepoint in powerpivot gallery library. The data source for this report is SQL Server 2008 r2. I have set the refresh options in sharepoint to run after business hours during
week end. When I check the refresh history it shows this error message "OLE DB or ODBC error: Query timeout expired; HYT00. An error occurred while processing the 'xxx' table. The current operation was cancelled because another operation in the
transaction failed..
I have tried to run the "Also refresh as soon as possible " just to check but same error message is shown.
This is the detailed error message details:
03/02/2014 21:06:55 03/02/2014 22:08:15 01:01:20 Failed
OLE DB or ODBC error: Query timeout expired; HYT00. An error occurred while processing the 'xxx' table. The current operation was cancelled because another operation in the transaction failed
Could anyone guide me on this issue? Truly appreciate your help in advance.Hi asritha,
I would suggest you take a look at the following articles regarding how to configure PowerPivot data refresh in SharePoint Server:
Configure and Use Stored Credentials for PowerPivot Data Refresh:
http://technet.microsoft.com/en-us/library/ee210671(v=sql.105).aspx
Configure and Use the PowerPivot Unattended Data Refresh Account:
http://technet.microsoft.com/en-us/library/ff773327(v=sql.105).aspx
Note: Please ensure that the account have sufficient permission access to your data source.
In addition, please elaborate your PowerPivot data soure with more detail. If you are using SSAS cube, please try to increase "ExternalConnectionTimeout" property default value to see if this helps. Here is the similar thread for your reference,
please see:
http://social.technet.microsoft.com/Forums/en-US/35b26c06-9e6d-41e5-ae44-bfb1233510ac/ssas2008-ole-db-error-ole-db-or-odbc-error-query-timeout-expired-hyt00?forum=sqldatamining
Regards,
Elvis Long
TechNet Community Support -
I am using SSRS for generate reports in my .net web application. For one of the report, an error "An error has occurred during report processing." is returned after 100s. The report can be generated successfully in report server
at around 3 minutes. So, I believed it is caused by timeout issue in one of the processes. However, i have verified the timeout settings but still got no ideas on how to fix it.
My code is a bit complicated since the connection type of my report's data source is an customized dll. In the dll, i will call an webservice to get data. Below is summary for the flow:
UI -> Reporting Service -> Customized Dll -> Web service -> SQL/Stored Procedures
The execution timeount in the web.config of both the reporting service and web service are set to 9000s (<httpRuntime executionTimeout = "9000" />). And coding about timeout of the service is set to 3000s (i.e. ReportingService rs = new ReportingService();
rs.timeout = 3000000;). In the execution properties of the report, Report Execution Time is set to "Do not timeout report execution" currently.
I think there is no problem for the customized dll and the web service it calls since it can be generated in report server direclty. But I have no idea about where the timeout occurs. Please kindly help.
Thanks,
ShirleyHi Shirley,
According to your description, you encountered time out issue when rendering your report in your web application. Right?
In Reporting Services, we have report execution timeout value and query timeout value for processing report and dataset. In this scenario, you have already set the report executionTimeout and "Do not timeout report execution" on report level. Since
this time issue only happens on specific report, it probably cause by processing large amount of data which exceeds the max query timeout. Please go to rsreportserver.config file and change the QueryTimeOut into "0". This file locates at
xx:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer
<Add Key="DatabaseQueryTimeout" Value="0"/>
Reference:
Setting Time-out Values for Report and Shared Dataset Processing (SSRS)
Troubleshooting Timeout errors in Reporting Services
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
Jdbc driver creates new thread for each statement with a query timeout set
I am profiling a web application that is using the Microsoft JDBC driver, version 1.1 to connect to a sql server 2005 database. Each java.sql.Statement that is created, within the application, gets a query timeout value set on it ( statement.setQueryTimeout(...) ).
I have discovered that the JDBC driver creates a new thread to monitor each Statement and the query timeout value. When the application is under load these threads are getting created faster then they are being destroyed and I am concerned that this will cause a performance problem in production.
One option I have is to remove the query timeout value and the monitor threads will not be created, another is to change JDBC drivers.
I'm curious is there any way to control this behavior so that these threads are not created or are managed more efficiently. Is there a workaround that anyone is aware of? Is this considered a bug?
I have found a similar bug here for the 2000 driver:
http://support.microsoft.com/default.aspx/kb/894552
CheersHi,
Thank you for using the Microsoft SQL Server JDBC driver. You are correct that a new thread is started to monitor the query timeout when a statement is executed. This is a potential performance issue that we may look at addressing in the upcoming v1.2 release. The current behavior is not configurable. The only workaround with the v1.1 driver is to limit your use of query timeouts to only those statements which you reasonably might expect to actually time out.
We do take customer feedback very seriously, so if anyone else is concerned about this particular issue, please chime in and we will be able to give it appropriate weight.
--David Olix [MSFT] -
I have the below network setup:-
1. Its a simple network at my father's office at a small town called Ichalkaranji (District - Kolhapur, Maharashtra).
2. We are using private network range 192.168.1.xxx with two Windows Server 2003 Enterprise Edition with SP2 licensed copies and 15 local Windows 7 clients who are only using Server A.
3. The network is having a TP-Link Braodband Router Connected to internet with the IP 192.168.1.1.
4. Both there Windows Server 2003 Enterprise Edition with SP2 are running separate SQL Server 2005 Express with Advanced Services, you can treat them as Server A (Problematic Server with IP of 192.168.1.2)
and Server B (this is not having any issue with IP of 192.168.1.3).
5. Server A is also being used by 6 Remote users from our Kolkata office using DDNS facility through the NO IP client software which installed separately on both the servers. Kolkata remote users
do not use OR access the Server B.
6. Server B is being used by only 2 Remote users from our Erode office (Under Salem District, Tamilnadu) using DDNS facility through the NO IP client software which installed separately on both
the servers. Erode remote users do not use OR access the Server A.
7. The front end application which running separately on both the servers have been developed in VB by a local vendor at Ichalkaranji (District - Kolhapur, Maharashtra).
8. Both Servers are having the same database structure in terms of design and tables format. Only difference is that both the servers are being used separately.
9. This error OR problem is only related to Server A, where on the clients we get the message "error [hyt00] [microsoft][odbc sql server driver] query timeout expired" every now and then.
10. We have to frequently reboot the server whenever we get this message on the client machines. May be after rebooting every thing works perfectly for 2 hours / 5 Hours / may be one full day but
the the error will come back for sure.
11. Current Database back up size on Server A is around 35 GB and take around 1 hour 15 minutes daily to take the back up.
12. Current Database back up size on Server B is around 3 GB and take around 5 to 10 minutes daily to take the back up.
13. One thing I have noticed is that when ever we reboot Server A, for some time sqlsrvr.exe file will show memory usage of 200 to 300 MBs but it will start using slowly, what i understand is that
this is the way SQL Server works.
14. Both the Servers are also running Quick heal Antivirus Server Edition separate licensed copies also.
15. Server B is also running Tally ERP 9 Licenses copy which is being used locally by 15 users of Ichalkaranji (District - Kolhapur, Maharashtra) same users
Can any one help to resolve this issue. Any help will be highly appreciated.The error message "query timeout expired" occurs, because by default many APIs, including ODBC only waits for 30 seconds for SQL Server to send any output. If no data has been seen for this period of time, they tell SQL Server to cancel execution
and return this error to the caller.
This timeout could be seen as a token that the query is taking too long time to execute and this needs to be fixed. But it can also be a pain in the rear parts, if you are content with a report taking five minutes, because you only run it once a day.
The simplest way to get rid of the error is to set the timeout to zero, which means "wait forever". This is something your vendor would have to do. This may, however, not resolve the problem, as the users may just find that the application is hanging.
To wit, there are two reasons why the query takes more than 30 seconds to complete. One is that there is simply that much work to do. This can be reduced by adding indexes or by doing other tuning, if the execution time is not acceptable. The other possibility
is blocking. That is, there is a process blocking this query from completing. This is much more likely to require attention.
It is not clear to me, whether the vendor has developed the database part as well. In this case, you should probably call the vendor's support desk to have them to sort this out.
Finally, I am little puzzled. You say that you are using Express Edition, but one of the databases is 35 GB in size. 35 GB is far above the limit for Express Edition.
Erland Sommarskog, SQL Server MVP, [email protected] -
Hi all,
I had a quick look, but couldn't find the answer: is there any way to set a query timeout for ADF Business Components queries, such that if a VO query takes more than x seconds, we will time out?
JohnHi all,
Upon further research - the query timeout is actually not what was causing the problem in the UI... I thought I'd summarize my findings here (I have a VO with a query that will take hours to run and I programatically set the timeout to 1 millisecond):
1). The Business Components Browser correctly reports "long-running query cancelled" exception when I access the VO
2). (this was the cause of the original "ADF Faces app says 'loading' forever) - The way that setQueryTimeout works on the VO is *not* by setting the query timeout on the underlying JDBC statement; it works by creating a monitor thread which will wake up and issue "cancelQuery" on the VO if it takes too long to execute. That causes a problem in the getEstimatedRowCount() call, which takes a long long time. If the af:table is set for lazy delivey, this delay happens on a PPR request, and thus the "loading" message is there forever.
3). If I over-ride getEstimatedRowCount to return 1000, the query timeout happens (in executeQueryForCollection) and displays a stack trace. If the af:table is lazy-loaded, the stack trace comes during PPR request, if af:table is immedate-loading, the stack trace happens during the initial request. In neither case is the query timeout exception displayed in the UI.
It seems to me that it would be a great benefit to use the setQueryTimeout method on the JDBC statement so that if the query timeout is set on the VO, then both executing the VO and calling getEstimatedRowCount would timeout. It also seems to me that it would be very beneficial for the timeout exception to be captured and displayed in the UI.
John
<bump/> -
Unable to access the data from Data Management Gateway: Query timeout expired
Hi,
Since 2-3 days the data refresh is failing on our PowerBI site. I checked below:
1. The gateway is in running status.
2. Data source is also in ready status and test connection worked fine too.
3. Below is the error in System Health -
Failed to refresh the data source. An internal service error has occurred. Retry the operation at a later time. If the problem persists, contact Microsoft support for further assistance.
Error code: 4025
4. Below is the error in Event Viewer.
Unable to access the data from Data Management Gateway: Query timeout expired. Please check 1) whether the data source is available 2) whether the gateway on-premises service is running using Windows Event Logs.
5. This is the correlational id for latest refresh failure
is
f9030dd8-af4c-4225-8674-50ce85a770d0
6.
Refresh History error is –
Errors in the high-level relational engine. The following exception occurred while the managed IDataReader interface was being used: The operation has timed out. Errors in the high-level relational engine. The following exception occurred while the
managed IDataReader interface was being used: Query timeout expired.
Any idea what could have went wrong suddenly, everything was working fine from last 1 month.
Thanks,
RichaNever mind, figured out there was a lock on SQL table which caused all the problems. Once I released the lock it PowerPivot refresh started working fine.
Thanks. -
Hello Archers,
I've set up an svn Server with Apache folloing your wiki on my raspberry pi.
https://wiki.archlinux.org/index.php/LAMP
https://wiki.archlinux.org/index.php/Subversion_Setup
Unfortunately I get errors when I try to commit several files (15 or so). I think it is a timeout issue, however I don't know where to specify the timeout in the httpd.conf (or httpd-ssl.conf)
This is a client error message:
Commit failed (details follow):
Unexpected end of svndiff Input
And this the corresponding server side log:
[date] [dav:error] [pid 448:tid 2854220848] (70007)The timeout specified has expired: [client 192.168.178.55:63819] Timeout reading the body (URI: /Dokumente/!svn/txr/9-q/Music/myfile.mp3) [408, #0]
[date] [dav:error] [pid 448:tid 2854220848] [client 192.168.178.55:63819] mod_dav_svn close_stream: error closing write stream [500, #185004]
[date] [dav:error] [pid 448:tid 2854220848] [client 192.168.178.55:63819] Unexpected end of svndiff input [500, #185004]
I assume it is some error like this: http://subversion.apache.org/faq.html#s … -truncated
I think I don't have specified the timeouts correctly, since I haven't found the default option.
tl:dr
Do you know how to set the timeouts in the apache configuration file?
I very much appreciate your help.
arch on pi
Here are my configuration Files with my position for the timeout order:
httpd-ssl.conf:
# This is the Apache server configuration file providing SSL support.
# It contains the configuration directives to instruct the server how to
# serve pages over an https connection. For detailed information about these
# directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
# Required modules: mod_log_config, mod_setenvif, mod_ssl,
# socache_shmcb_module (for default value of SSLSessionCache)
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#SSLRandomSeed startup file:/dev/random 512
SSLRandomSeed startup file:/dev/urandom 512
#SSLRandomSeed connect file:/dev/random 512
SSLRandomSeed connect file:/dev/urandom 512
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
Listen 443
## SSL Global Context
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
# SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_ssl documentation for a complete list.
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
# Speed-optimized SSL Cipher configuration:
# If speed is your main concern (on busy HTTPS servers e.g.),
# you might want to force clients to specific, performance
# optimized ciphers. In this case, prepend those ciphers
# to the SSLCipherSuite list, and enable SSLHonorCipherOrder.
# Caveat: by giving precedence to RC4-SHA and AES128-SHA
# (as in the example below), most connections will no longer
# have perfect forward secrecy - if the server's key is
# compromised, captures of past or future traffic must be
# considered compromised, too.
#SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5
#SSLHonorCipherOrder on
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is an internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog builtin
# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
#SSLSessionCache "dbm:/run/httpd/ssl_scache"
SSLSessionCache "shmcb:/run/httpd/ssl_scache(512000)"
SSLSessionCacheTimeout 6000
## SSL Virtual Host Context
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "/mnt/sda1/svn"
ServerName 192.168.178.48:443
ServerAdmin [email protected]
ErrorLog "/var/log/httpd/error_log"
TransferLog "/var/log/httpd/access_log"
# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on
# Server Certificate:
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that a kill -HUP will prompt again. Keep
# in mind that if you have both an RSA and a DSA certificate you
# can configure both in parallel (to also allow the use of DSA
# ciphers, etc.)
# Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
# require an ECC certificate which can also be configured in
# parallel.
SSLCertificateFile "/etc/httpd/conf/server.crt"
#SSLCertificateFile "/etc/httpd/conf/server-dsa.crt"
#SSLCertificateFile "/etc/httpd/conf/server-ecc.crt"
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
# ECC keys, when in use, can also be configured in parallel
SSLCertificateKeyFile "/etc/httpd/conf/server.key"
#SSLCertificateKeyFile "/etc/httpd/conf/server-dsa.key"
#SSLCertificateKeyFile "/etc/httpd/conf/server-ecc.key"
# Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the
# concatenation of PEM encoded CA certificates which form the
# certificate chain for the server certificate. Alternatively
# the referenced file can be the same as SSLCertificateFile
# when the CA certificates are directly appended to the server
# certificate for convenience.
#SSLCertificateChainFile "/etc/httpd/conf/server-ca.crt"
# Certificate Authority (CA):
# Set the CA certificate verification path where to find CA
# certificates for client authentication or alternatively one
# huge file containing all of them (file must be PEM encoded)
# Note: Inside SSLCACertificatePath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCACertificatePath "/etc/httpd/conf/ssl.crt"
#SSLCACertificateFile "/etc/httpd/conf/ssl.crt/ca-bundle.crt"
# Certificate Revocation Lists (CRL):
# Set the CA revocation path where to find CA CRLs for client
# authentication or alternatively one huge file containing all
# of them (file must be PEM encoded).
# The CRL checking mode needs to be configured explicitly
# through SSLCARevocationCheck (defaults to "none" otherwise).
# Note: Inside SSLCARevocationPath you need hash symlinks
# to point to the certificate files. Use the provided
# Makefile to update the hash symlinks after changes.
#SSLCARevocationPath "/etc/httpd/conf/ssl.crl"
#SSLCARevocationFile "/etc/httpd/conf/ssl.crl/ca-bundle.crl"
#SSLCARevocationCheck chain
# Client Authentication (Type):
# Client certificate verification type and depth. Types are
# none, optional, require and optional_no_ca. Depth is a
# number which specifies how deeply to verify the certificate
# issuer chain before deciding the certificate is not valid.
#SSLVerifyClient require
#SSLVerifyDepth 10
# TLS-SRP mutual authentication:
# Enable TLS-SRP and set the path to the OpenSSL SRP verifier
# file (containing login information for SRP user accounts).
# Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
# detailed instructions on creating this file. Example:
# "openssl srp -srpvfile /etc/httpd/conf/passwd.srpv -add username"
#SSLSRPVerifierFile "/etc/httpd/conf/passwd.srpv"
# Access Control:
# With SSLRequire you can do per-directory access control based
# on arbitrary complex boolean expressions containing server
# variable checks and other lookup directives. The syntax is a
# mixture between C and Perl. See the mod_ssl documentation
# for more details.
#<Location />
#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
#</Location>
# SSL Engine Options:
# Set various options for the SSL engine.
# o FakeBasicAuth:
# Translate the client X.509 into a Basic Authorisation. This means that
# the standard Auth/DBMAuth methods can be used for access control. The
# user name is the `one line' version of the client's X.509 certificate.
# Note that no password is obtained from the user. Every entry in the user
# file needs this password: `xxj31ZMTZzkVA'.
# o ExportCertData:
# This exports two additional environment variables: SSL_CLIENT_CERT and
# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
# server (always existing) and the client (only existing when client
# authentication is used). This can be used to import the certificates
# into CGI scripts.
# o StdEnvVars:
# This exports the standard SSL/TLS related `SSL_*' environment variables.
# Per default this exportation is switched off for performance reasons,
# because the extraction step is an expensive operation and is usually
# useless for serving static content. So one usually enables the
# exportation for CGI and SSI requests only.
# o StrictRequire:
# This denies access when "SSLRequireSSL" or "SSLRequire" applied even
# under a "Satisfy any" situation, i.e. when it applies access is denied
# and no other module can change it.
# o OptRenegotiate:
# This enables optimized SSL connection renegotiation handling when SSL
# directives are used in per-directory context.
#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/srv/http/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
# SSL Protocol Adjustments:
# The safe and default but still SSL/TLS standard compliant shutdown
# approach is that mod_ssl sends the close notify alert but doesn't wait for
# the close notify alert from client. When you need a different shutdown
# approach you can use one of the following variables:
# o ssl-unclean-shutdown:
# This forces an unclean shutdown when the connection is closed, i.e. no
# SSL close notify alert is sent or allowed to be received. This violates
# the SSL/TLS standard but is needed for some brain-dead browsers. Use
# this when you receive I/O errors because of the standard approach where
# mod_ssl sends the close notify alert.
# o ssl-accurate-shutdown:
# This forces an accurate shutdown when the connection is closed, i.e. a
# SSL close notify alert is send and mod_ssl waits for the close notify
# alert of the client. This is 100% SSL/TLS standard compliant, but in
# practice often causes hanging connections with brain-dead browsers. Use
# this only for browsers where you know that their SSL implementation
# works correctly.
# Notice: Most problems of broken clients are also related to the HTTP
# keep-alive facility, so you usually additionally want to disable
# keep-alive for those clients, too. Use variable "nokeepalive" for this.
# Similarly, one has to force some clients to use HTTP/1.0 to workaround
# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
# "force-response-1.0" for this.
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
CustomLog "/var/log/httpd/ssl_request_log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
#SSLSessionTimeout 5m
Timeout 600000
<Location />
DAV svn
SVNParentPath /mnt/sda1/svn/repos
AuthzSVNAccessFile /home/svn/.svn-policy-file
AuthName "SVN Repositories"
AuthType Basic
AuthUserFile /home/svn/.svn-auth-file
# Satisfy Any
Require valid-user
</Location>
</VirtualHost>
httpd.conf
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
# will be interpreted as '/logs/access_log'.
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used. If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
ServerRoot "/etc/httpd"
Timeout 60000
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
# Mutex default:/run/httpd
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#Listen 12.34.56.78:80
Listen 80
# Dynamic Shared Object (DSO) Support
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
# Example:
# LoadModule foo_module modules/mod_foo.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#nach fehlermeldung
LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
LoadModule authz_core_module modules/mod_authz_core.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_form_module modules/mod_auth_form.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule allowmethods_module modules/mod_allowmethods.so
#LoadModule file_cache_module modules/mod_file_cache.so
#Felhermeldung undefined symbols
LoadModule cache_module modules/mod_cache.so
#LoadModule cache_disk_module modules/mod_cache_disk.so
#nach Fehlermeldung
LoadModule cache_socache_module modules/mod_cache_socache.so
#nochne Fehlermeldung
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule watchdog_module modules/mod_watchdog.so
#LoadModule macro_module modules/mod_macro.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule echo_module modules/mod_echo.so
#LoadModule buffer_module modules/mod_buffer.so
#LoadModule data_module modules/mod_data.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule request_module modules/mod_request.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
#LoadModule reflector_module modules/mod_reflector.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule deflate_module modules/mod_deflate.so
#LoadModule xml2enc_module modules/mod_xml2enc.so
#LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule mime_module modules/mod_mime.so
#LoadModule ldap_module modules/mod_ldap.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule logio_module modules/mod_logio.so
#LoadModule lua_module modules/mod_lua.so
LoadModule env_module modules/mod_env.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
#LoadModule remoteip_module modules/mod_remoteip.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_express_module modules/mod_proxy_express.so
#LoadModule session_module modules/mod_session.so
#LoadModule session_cookie_module modules/mod_session_cookie.so
#LoadModule session_crypto_module modules/mod_session_crypto.so
#LoadModule session_dbd_module modules/mod_session_dbd.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
#Fuer die cipher suite
LoadModule ssl_module modules/mod_ssl.so
#LoadModule dialup_module modules/mod_dialup.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule unixd_module modules/mod_unixd.so
#LoadModule heartbeat_module modules/mod_heartbeat.so
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
#1 for svn
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule asis_module modules/mod_asis.so
#LoadModule info_module modules/mod_info.so
#LoadModule suexec_module modules/mod_suexec.so
#LoadModule cgid_module modules/mod_cgid.so
#LoadModule cgi_module modules/mod_cgi.so
#2 for svn
LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
#LoadModule imagemap_module modules/mod_imagemap.so
#LoadModule actions_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
#LoadModule rewrite_module modules/mod_rewrite.so
#3 for svn
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
<IfModule unixd_module>
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User http
Group http
</IfModule>
# 'Main' server configuration
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. [email protected]
ServerAdmin [email protected]
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
# If your host doesn't have a registered DNS name, enter its IP address here.
#ServerName www.example.com:80
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
<Directory />
AllowOverride none
Require all denied
</Directory>
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot "/mnt/sda1"
#<Directory "/mnt/sda1/svn/repos">
# # Possible values for the Options directive are "None", "All",
# # or any combination of:
# # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# # Note that "MultiViews" must be named *explicitly* --- "Options All"#
# # doesn't give it to you.
# # The Options directive is both complicated and important. Please see
# # http://httpd.apache.org/docs/2.4/mod/core.html#options
# # for more information.#
# Options Indexes FollowSymLinks
# # AllowOverride controls what directives may be placed in .htaccess files.
# # It can be "All", "None", or any combination of the keywords:
# # AllowOverride FileInfo AuthConfig Limit
# AllowOverride None
# # Controls who can get stuff from this server.
# Require all granted
#</Directory>
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
<Files ".ht*">
Require all denied
</Files>
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
ErrorLog "/var/log/httpd/error_log"
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
<IfModule log_config_module>
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
CustomLog "/var/log/httpd/access_log" common
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#CustomLog "/var/log/httpd/access_log" combined
</IfModule>
<IfModule alias_module>
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
# Example:
# Redirect permanent /foo http://www.example.com/bar
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
ScriptAlias /cgi-bin/ "/srv/http/cgi-bin/"
</IfModule>
<IfModule cgid_module>
# ScriptSock: On threaded servers, designate the path to the UNIX
# socket used to communicate with the CGI daemon of mod_cgid.
#Scriptsock cgisock
</IfModule>
# "/srv/http/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
<Directory "/srv/http/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
TypesConfig conf/mime.types
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#AddType application/x-gzip .tgz
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#AddHandler cgi-script .cgi
# For type maps (negotiated resources):
#AddHandler type-map var
# Filters allow you to process content before it is sent to the client.
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#MIMEMagicFile conf/magic
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#EnableMMAP off
#EnableSendfile on
# Supplemental configuration
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.
# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf
# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
Include conf/extra/httpd-autoindex.conf
# Language settings
Include conf/extra/httpd-languages.conf
# User home directories
Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
Include conf/extra/httpd-default.conf
# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
# Secure (SSL/TLS) connections
Include /etc/httpd/conf/extra/httpd-ssl.conf
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
# uncomment out the below to deal with user agents that deliberately
# violate open standards by misusing DNT (DNT *must* be a specific
# end-user choice)
#<IfModule setenvif_module>
#BrowserMatch "MSIE 10.0;" bad_DNT
#</IfModule>
#<IfModule headers_module>
#RequestHeader unset DNT env=bad_DNT
#</IfModule>
Edit: inserted tl;dr
Last edited by arch_on_pi (2014-05-18 21:33:24)Remember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them. This may or may not be unique to Arch Arm, so you might try asking on their forums as well.
-
Query Timeout on stored procedure executed from Access 2010
I am trying to delete old jobs from a SQL 2008 R2 database. I created a stored procedure on the server that deletes all Jobs over 1 year old. The delete can take several minutes to run as it deletes record on several related tables. I am getting a error
"2147217871 - [Microsoft][ODBC SQL Server Driver]Query timeout expired". The query runs fine on the Server. I have tried setting Client timeout to 300 sec but it times out way before 5 min. I am not sure what else I
can do to fix this problem. I am hoping someone has seen this and figured out a fix.
Here is there code
Public Sub Cleanup_Database()
On Error GoTo CleanUp_Err
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
ODBC_conn = "ODBC;Description=testbox2;DRIVER=SQL Server;" & _
"SERVER=O2GMSAPPTEST\SQL122DEVL;Trusted_Connection=Yes;" & _
"APP=Microsoft Office 2010;DATABASE=IMB_TraceData;StatsLog_On=Yes"
cmd.ActiveConnection = ODBC_conn
cmd.CommandType = adCmdStoredProc
cmd.CommandText = "DataBase_Cleanup"
cmd.Execute
CleanUp_Err:
Dim i As Long
Dim str As String
str = ""
For i = 0 To Errors.Count - 1
str = str & Errors(i).Number & "-" & Errors(i).Description & " " & vbNewLine
Next i
If str = "" Then
str = Err.Number & " - " & Err.Description
End If
MsgBox str, , "Trace Update"
End Sub
You didn't say how you were setting the client timeout, but this has worked for me in an adp.
'Temporarily increase query timeout, which is an application-wide setting
'CurrentProject.Connection.CommandTimeout = 60 'Too late to change this setting- no effect
Const cstrTimeoutOptionName As String = "OLE/DDE Timeout (Sec)"
Const clngTimeoutSecondsForQuery As Long = 300
strQueryTimeOutOriginal = Application.GetOption(OptionName:=cstrTimeoutOptionName)
Application.SetOption cstrTimeoutOptionName, CStr(clngTimeoutSecondsForQuery)
Paul -
Hi Gurus,
I m woking on performance tuning at the moment and wants some tips
regarding the Query performance tuning,if anyone can helpme in that
rfrence.
the thing is that i have got an idea about the system and now the
issues r with DB space, Abap Dumps, problem in free space in table
space, no number range buffering,cubes r using too many aggrigates,
large IC,Large ODS, and many others.
So my questionis that is anyone can tell me that how to resolve the
issues with the Large master data tables,and large ODS,and one more
importnat issue is KPI´s exceding there refrence valuses so any idea
how to deal with them.
waiting for the valuable responces.
thanks In advance
Redards
AmitHi Amit
For Query performance issue u can go for :-
Aggregates : They will help u a lot to make ur query faster becuase query doesnt hits ur cube it hits the aggregates which has very less number of records in comp to ur cube
secondly i wud suggest u is use CKF in place of formulaes if any in the query
other thing is avoid upto the extent possible the use fo nav attr . if u want to use them use it upto the minimal level reason i am saying so is during the query exec whn ever there is nav attr it provides unncessary join to ur MD and thus dec query perfo
be specifc to rows and columns if u r not sure of a kf or a char then better put it in a free char.
use filters if possible
if u follow these m sure ur query perfo will inc
Assign points if applicable
Thanks
puneet -
JDBC & setQueryTimeout - or is there another way to set query timeout?
I am trying to set query timeout for TimesTen using jdbc library. But it seems like TimesTen jdbc library does not support setQueryTimeOut. Is there a way to set it without having to set it statically in the DNS?
I tried to set the SqlQueryTimeout in the connection string but it doesn't work either:
Connection connection = DriverManager.getConnection(
"jdbc:timesten:client:TTC_SERVER=bleh;TCP_PORT=17013;TTC_Server_DSN=blah;TTC_Timeout=0;SqlQueryTimeout=5;");
Thanks for your help!Thanks for replying. I don't know have good knowledge on Cache Connect. I will have to read on that first.
It seems like TimesTen does not support jdbc setQueryTimeout. Calling this method on TimesTen jdbc library will return false: supportsQueryTimeout().
I created a test class for testing the SqlQueryTimeout. I set the TTC_Timeout to 400 seconds and SqlQueryTimeOut to 5 seconds. So after 5 seconds it should time out.
The way I test it is by putting a break point before executing the query, do a route add DBServer to an un-connectible gateway to simulate the network delay/connection problem and then continue after I added the route.
After executing the query, instead of timing out after 5 second, it will wait for a few minutes before timing out.
The code for testing the timeout is as follow:
public class TTTest {
public static void main(String[] args) throws ClassNotFoundException {
Class.forName("com.timesten.jdbc.TimesTenDriver");
try {
Connection connection = DriverManager.getConnection(
"jdbc:timesten:client:TTC_SERVER=server;TCP_PORT=17013;TTC_Server_DSN=server_dns;"
+ "TTC_Timeout=400;SqlQueryTimeout=5;");
System.out.println(connection.getClass().getName());
Statement stmt = connection.createStatement();
//com.timesten.jdbc.JdbcOdbcStatement stmt = (JdbcOdbcStatement)connection.createStatement();
System.out.println(stmt.getClass().getName());
System.out.println("Query started " + new Date());
// Pause here, put a route add and continue
ResultSet rs = stmt.executeQuery("select count(*) from mse");
rs.next();
System.out.println("there are " + rs.getInt(1) + " rows");
rs.close();
stmt.close();
connection.close();
} catch (Exception x) {
x.printStackTrace(System.err);
System.err.println(new Date());
} -
Anomaly when query timeout in Data buffer
Hello experts
I'm using MII12.2 and query buffered (allow buffering flag) on a database with several tables locks.
When I get a query timeout (LastErrorMessage of the query is "Response timed out, request terminated"), the query is not queued in the buffer.
Just if I send the query to the buffer setting a wrong used id in the dataserver, then the manager works properly (when I restore the used id, the query completes its logic when the lock is released)
If anybody wants to replicate the enviroment, the query for table lock in SQL Server is
BEGIN TRANSACTION
SELECT * FROM [your table name] WITH (TABLOCKX, HOLDLOCK);
WAITFOR DELAY '00:10:00'
ROLLBACK TRANSACTION
You have to run it in SQL Manager, not in MII
Sequence:
- Create in MII a generic query with SELECT * FROM [your table name], and enable "allow buffering"
- Call it in a transaction (if you want, with exception handler)
- Run the lock query in SQL Server
- Run the transaction (while the table is locked by SQL Server query) and wait transaction/query error
- Check data buffer: the MII query is not buffered
Is it normal?
Is there any patch?
Thanks
Regards
FabioHi Fabio,
I think the query does not gets buffered because no communication error happened.
MII would buffer an external call if there is a communication error.
But in your case the communication happened fine and the DB did not gave the response and thus time out happened. One more scenario of this type is if we write a query with syntax error. Here also the communication will happen with the DB but the DB will give the error thus MII will not buffer the query.
Regards,
Rohit Negi. -
Setting query timeout in TopLink 10g
The 10g version of OAAM uses TopLink 10g Release 3 (10.1.3.1.0) (Build 061004) and Oracle JDBC Driver 10.2.0.2.0. We are not using TopLink Essentials. I'm trying to make it so that our queries will timeout and throw an exception if they take too long. I have tried several things, but haven't had any luck so far. I have tried each of the following:
* Adding <property name="javax.persistence.query.timeout" value="1"/> to the <login> element in sessions.xml.
* Setting the query policy in my descriptors like this:
<opm:querying xsi:type="toplink:query-policy">
<opm:timeout>1</opm:timeout>
</opm:querying>
* Calling DatabaseQuery.setQueryTimeout(1).
* Calling setProperty("javax.persistence.query.timeout") on the database login, server session, client session, and unit of work.
In each case, I tried to update a locked table, and the application simply hung until I unlocked the table. I also tried executing select queries that take around 15 seconds to run, and those completed normally. I want to make the application throw a database exception instead. How can I make this work?
I ran this test to eliminate the JDBC driver as a suspect:
java.util.Properties props = new java.util.Properties();
Class.forName("oracle.jdbc.driver.OracleDriver");
props.setProperty("user", "teng_oaam");
props.setProperty("password", "******");
java.sql.Connection conn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@******:1521:brsadb", props);
System.out.println(conn.getMetaData().getDriverName() + " " +conn.getMetaData().getDriverVersion());
java.sql.Statement stmt = conn.createStatement();
stmt.setQueryTimeout(1);
System.out.println(stmt.getClass());
System.out.println(new java.util.Date());
try {
// this query takes about 20 seconds to execute
java.sql.ResultSet rs = stmt.executeQuery("select * from vcrypt_ip_location_map where from_ip_addr<=1160157297 and to_ip_addr>=1160157297");
} catch (Exception ex) {
ex.printStackTrace();
System.out.println(new
java.util.Date());
The query fails with ORA-01013, which is what I expect to happen, so the problem is not in my JDBC driver.
Thanks,
Josh Davispublic static Integer executeUpdate(TopLinkDBMgr topLinkDBMgr, BharosaDBQuery dbQuery) throws BharosaDBException {
DataModifyQuery query = null;
List args = Collections.EMPTY_LIST;
long startTime = System.currentTimeMillis();
try {
AbstractSession session = (AbstractSession) topLinkDBMgr.beginSession(); +// creates a ClientSession and calls session.beginTransaction()+
query = new DataModifyQuery();
query.setCall(new SQLCall(dbQuery.getQueryString().replace(':', '#'))); +// we still have some SQL queries we haven't changed since we used Hibernate+
Vector arguments = bindArgumentsForRawSql(dbQuery, query);
args = arguments;
query.setQueryTimeout(1);
Object result = session.executeQuery(query, arguments);
return converter.toInteger(result);
} catch (BharosaDBException ex) {
throw ex;
} catch (Exception e) {
throw BharosaDBException.createDBObjectQueryException(dbQuery.getQueryString(), e);
} finally {
topLinkDBMgr.endSession(); +// calls session.endTransaction() on the ClientSession+
long time = System.currentTimeMillis() - startTime;
Level level = getLogLevelForElapsedTime(time);
if (logger.isEnabledFor(level)) {
String message = buildPerformanceMessage(query, args);
logPerformance(level, time, message);
For my test, I lock a table in SQL*Plus, and there is a background process that uses this method to update that table. That process hangs until I release the lock in SQL*PLus.
This is a corner case, though. Most of our updates are done with the UnitOfWork class, so I need to be able to make the queries that it generates time out also.
Thanks,
Josh
Maybe you are looking for
-
Unable to drop an image object onto an ALV.
Hi , I have created an Image with value 'OBJECT_IMAGE' for the tag in the Drag Source Info. I have created an ALV and declared it as a drop target by calling the 'create_drop_row_target_info' using the ALV configuration model and passed in the value
-
How to read a text file and write text file
Hello, I have a text file A look like this: 0 0 0 A B C 1 B C D 2 D G G 10 1 A R T 2 T Y U 3 G H J 4 T H K 20 1 G H J 2 G H J I want to always get rid of last letter and select only the first and last line and save it to another text file B. The outp
-
Apple TV will only play the first song on an album, why?
When I press play on an album (music), Apple TV only play the first song, then it stops. Why?? I can understand it when I press play on a spesific song/track, but when I press play on an entire album, I want Apple TV to play the entire album.
-
Uninstalled, reinstalled, 3 times. Tested through Solution center& HP Print & Scan Doctor..unable to scan from an HP Officejet 6310 All-in-One printer, connected though USB to an HP Pavilion dv6 running Windows 7 home premium. CD too old to use. D
-
ADF Logs dispaly in Custom Application
Experts, In any Jdev 11g application, when we are using ADF Logger we can check the logs in EM. I want to do the same but im my custom application. For eg. on admin login i want to enable and see the logs on the page itself. Any inputs on how to do t