Oracle9i Application Server Using the PL/SQL Gateway
Release 1.0.2.1

Part Number A87562-01

Library

Service

Contents

Index

Go to previous page Go to next page

B
Troubleshooting

OAS Compatibility

Using the mod_plsql without the /pls in the URL

You can use the mod_plsql without the /pls in the URL (similar to the Oracle Application Server [OAS] 4.0.8).


Note:

The default installation of mod_plsql is mapped to /pls. The code in the plsql.conf is similar to:

[...] 
<Location /pls> 
  SetHandler pls_handler 
  ... 
</Location> 
[...] 
 

There are several methods, outlined below.

Using Flexible Parameters and the Exclamation Mark

The Flexible Parameter passing mode in Oracle9i Application Server expects the PL/SQL procedure to have the exclamation mark before the procedure name. Due to performance implications of the auto-detect method used in OAS, the exclamation mark is now required for flexible parameter passing in Oracle9i Application Server.

In OAS, each procedure is described completely before being executed. The Procedure Describe call figures out the signature of the procedure and requires a round-trip to the database. The PL/SQL Gateway in Oracle9i Application Server avoids this round trip by having end-users explicitly indicate the flexible parameter passing convention by adding the exclamation mark before the procedure. Refer to "Flexible Parameter Passing" for more information.

Logging

To turn on logging for mod_plsql, do the following:

  1. Stop the Apache Listener.


    Note:

    When sending log file to Oracle support, start with a clean set of log files to expedite the process. You can either archive or delete the older logs after Step 1.  


  2. Edit the file <ORACLE_HOME>/Apache/modplsql/cfg/wdbsvr.app.

  3. Change the line containing debugModules to debugModules=all.

  4. Restart your listener.

When you get an error, stop the Apache listener. The mod_plsql debug log files can be found in <ORACLE_HOME>/Apache/modplsql/log directory. Additionally, look at the following log files for errors:

     <ORACLE_HOME>/Apache/Apache/logs/httpd_access_log 
     <ORACLE_HOME>/Apache/Apache/logs/httpd_error_log 
     <ORACLE_HOME>/Apache/Jserv/logs/jserv.log 
     <ORACLE_HOME>/network/admin/sqlnet.log 
     <ORACLE_HOME>/admin/<database>/bdump/alert 

When you are finished debugging, revert the change in the configuration file (wdbsvr.app) by typing a semi-colon before the line to comment it out.Enabling logging degrades your web server's performance.

Controlling Database Processes for Each mod_plsql Request

The database connection pool in mod_plsql is not shared across Apache processes, which means that each process maintains its own pool. The total number of database connections pooled in Apache mod_plsql is directly related to the number of Apache processes that are spawned and the number of DAD's used to access different PL/SQL applications. The mod_plsql pools one database session per DAD per Apache process. So, the maximum number of database sessions that will be pooled by mod_plsql will be (NumberOfApacheProcesses*NumberOfDADs).

On NT, where Apache is multi-threaded, all threads share the same database connection pool. The maximum number of database sessions that will be pooled by mod_plsql is (MaximumNumberOfApacheThreadsConcurrentlyActive
ForEachDAD). This is the ideal case scenario where every thread can take advantage of a database session created by another thread.

On platforms where Apache is not multi-threaded, it is important that the following parameters be tuned.

If your database is unable to handle the load, do one of the following:

The mod_plsql in Oracle9i Application Server v1.0.2 has a cleanup thread which periodically cleans up database sessions which are inactive for more than 15 minutes. So, you need not be concerned about database related resources since mod_plsql does the cleanup automatically at idle time.

Debugging

The following series of steps can help you isolate your particular problem. Verify you can do each step before proceeding to the next one.

  1. If you are getting Login failures, confirm that your DAD configuration in <ORACLE_HOME>\Apache\modplsql\cfg\wdbsvr.app has the proper user name, password and connect string. Use SQL*Plus to verify that you have connectivity to the database.

  2. If you have multiple Oracle homes, verify that the New8 alias is present in the correct tnsnames.ora file. Synchronize all versions of tnsnames.ora to have the same content. Merge the files instead of directly copying one over the other.

  3. If you can logon, try accessing a simple procedure, for example:

    http://host:port/pls/DAD/owa_util.print_cgi_env
    
    
  4. If you still have problems, contact Oracle Support and provide the log files. Refer to the "Logging" section for instructions on obtaining a log.

Error Code 503 (Service Temporarily Unavailable)

If you are getting error code "503 Service Temporarily Unavailable" when your web server is under some load, determine if the mod_plsql cannot connect to the database because the maximum number of database sessions has been reached.

Check the maximum number of sessions parameter in your database configuration file. This parameter is called processes and is in your database configuration file init$SID.ora. This number must be at least equal to the maximum number of Apache processes configured in httpd.conf (StartServers+MaxSpareServers).

Verify this is the issue by doing the following. As soon as you get this error, connect as SYS thru SQL*Plus, and issue "select username from v$session". If the count of the number of rows is almost the same as what you have in init$SID.ora, then you are having this problem.


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.

Library

Service

Contents

Index