A method for predicting actual errors and failures in a primary application in real-time and providing preventive maintenance measures, wherein the method is implemented by at least one processor executing program instructions stored in a memory, the method comprising: generating, by the processor, timestamped event logs by converting one or more sequence of events during execution of the primary application using one or more parsing techniques, wherein the one or more sequence of events include execution sequence of software components and resource components associated with the primary application; modelling, by the processor, multiple user requests, the multiple user requests are representative of a functionality desired from the primary application, wherein the multiple user requests are modelled based on an arrival time and required functionality associated with each user request using real-time data extracted from the timestamped event logs; creating, by the processor, one or more execution sequences of the software components associated with the primary application based on the generated timestamped event logs; generating, by the processor, an execution scheme for the software components associated with the primary application based on the modelled user requests, the execution sequence and a real-time status of resource components; predicting, by the processor, a propensity of failure of the primary application based on the timestamped event logs, the modelled user requests, the one or more execution sequences, the real-time resource status and the execution scheme; and analyzing, by the processor, the predicted failures and actual failures extracted from the timestamped event logs and identify actual errors which occur at run-time during execution of the primary application and provide preventive maintenance measures. generating, by the processor, timestamped event logs by converting one or more sequence of events during execution of the primary application using one or more parsing techniques, wherein the one or more sequence of events include execution sequence of software components and resource components associated with the primary application; modelling, by the processor, multiple user requests, the multiple user requests are representative of a functionality desired from the primary application, wherein the multiple user requests are modelled based on an arrival time and required functionality associated with each user request using real-time data extracted from the timestamped event logs; creating, by the processor, one or more execution sequences of the software components associated with the primary application based on the generated timestamped event logs; generating, by the processor, an execution scheme for the software components associated with the primary application based on the modelled user requests, the execution sequence and a real-time status of resource components; predicting, by the processor, a propensity of failure of the primary application based on the timestamped event logs, the modelled user requests, the one or more execution sequences, the real-time resource status and the execution scheme; and analyzing, by the processor, the predicted failures and actual failures extracted from the timestamped event logs and identify actual errors which occur at run-time during execution of the primary application and provide preventive maintenance measures.