Jul 192016
 
 Posted by on July 19, 2016 at 11:23 pm Linux, Operating Systems, Oracle Database, Tutorials No Responses »
Linux

While installing Oracle database for one of DEV environments we encountered a error due to small swap space available in machine. As this was used for Development only and not required to be production grade we have made a quick hack to fix the swap space issue without recreating the VM again. So before we dive into the quick hack let’s first know what is swap space and why its required.

A very crisp excerpt is  swapping is necessary for two important reasons.

 

  1. When the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately.
  2. A significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.

Now to increase the swap space without recreating the VM can be done by below steps:

  • Login as root and check what is the current swap space available and how much needs to be added more using below command.
swapon -s

swapon output Note: All outputs are in KB. Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Jun 242016
 
 Posted by on June 24, 2016 at 7:44 pm Database, Oracle Database No Responses »
Oracle Database

While upgrading Oracle database 11g to 12C via DBUA we came to know that the Packages and Types component is in invalid state in Dba_registry.

Below are the errors seen from DBUA as well as command line while upgrading.

Upgrade assistant failed in bringing up the database
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Jun 132016
 
 Posted by on June 13, 2016 at 6:43 pm Application Servers, Java App Servers, Jboss/WildFly Tagged with: ,  No Responses »
Jboss or Wildfly

While working on deploying a web application on WildFly which implements rest services, we came across below issue of REST services not starting up and all the packaged modules in ear was not initializing and many places it was complaining about the missing dependants. So to avoid this issue of conflicts with Wildfly bundled apis we need to include jboss-deployment-structure.xml file to our applications war file.

jboss-deployment-structure.xml is a new JBoss specific optional deployment descriptor for JBoss EAP 6+. This deployment descriptor provides control over class loading in the deployment in a fine grained manner. A brief write up about the same can be found here in JBoss Deployment Structure File and Add dependency configuration to jboss-deployment-structure.xml links.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Apr 162016
 
FAQ

Many times we face issues like the database will be down due to some reason and even after the database issue has been fixed the application data source wont be able to reconnect to DB properly or it will run on some stale DB connections and cause transaction failure and unexpected behaviors. To avoid this we need to configure the JNDI pool to autoreconnect to a valid connection to database after recovering from shutdown/failure so that application can run smoothly.

In this article we will discuss the JNDI/DataSource autoreconnect configuration steps for different application servers.

Apache Tomcat J2EE ServerTomcat jdbc connection pool reconnect:

i. Login to Tomcat server.
ii. Navigate to ‘\conf’ and edit context.xml file
iii. Add parameters ‘validationQuery=”select 1 from dual”’ and ‘testOnBorrow=”true”’ under the Resource tag.

<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
initialSize="5"
maxActive="120"
maxIdle="5"
maxWait="5000"
name="jdbc/oracle/myds"
password="secret"
poolPreparedStatements="true"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@DBHOSTNAME:1521/ServiceName"
username="testuser"
validationQuery="select 1 from tab"
testOnBorrow="true"/>

iv. Restart tomcat to reflect the changes.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.
Apr 112016
 
 Posted by on April 11, 2016 at 8:20 pm Big Data, Database, MongoDB 2 Responses »
MongoDB

When Using MongoDB in local computer or laptop for development we usually see mongoDB eating up all RAM and makes the machine very slow to operate, so in this article we will discuss on how to restrict MongoDB memory usage in a non standard way. Usually it is suggested not to restrict mongoDB memory as MongoDB defers to the operating system when loading data into memory from disk. It simply memory maps all its data files and relies on the operating system to cache data. The OS typically evicts the least-recently-used data from RAM when it runs low on memory. So in a production environment it is not recommended to restrict MongoDB memory usage as this might impact the performance and functionalities.
Continue reading »

© Incase of any copyright infringements please check copyrights page for faster resolutions.