Post by ludwigloh » Wed Aug 19, 2015 3:00 pm

Hi all

We have run into a problem in our admin-area that i cannot find the cause to. Suddenly, every pageview in the admin-area takes 5 seconds to complete. No more, no less, regardless of page being viewed. The customer-area is unaffected with fast response.

I have pinned the problem to a line in system/engine/front.php in the function "execute". Im sure this is the end of the road and the cause of the error, but I cannot reach further than this on my own. The line says

$action = call_user_func_array(array($controller, $action->getMethod()), $action->getArgs());

and usually when in the admin-area this function gets called 3 times every pageview. If i measure the time this line takes to complete, I get this result

$action->getMethod() = login, 0.00019001960754395s
$action->getMethod() = permission, 0.00017690658569336s
$action->getMethod() = index, 5.026312828064s <- slow

we cannot recall making any changes in the last few weeks, nor have we added or updated any modules. Im sure im overlooking something and would greatly appreciate any help on this matter. Where to look next?

We run Opencart 1.5.6.1 with shoppica2.

Newbie

Posts

Joined
Wed Aug 19, 2015 2:43 pm

Post by ludwigloh » Thu Aug 20, 2015 10:29 pm

Hi

Solved this today. We had an extension called Velocity Menubar v1.0 By Velocity and that is a vqmod with a section like this

public function getAdd($adv_id, $plugin_id) {
$data = array('adv_id' => $adv_id, 'plugin_id' => $plugin_id);
$ch = curl_init('http://ocdemo.velsof.com/velsof_advertisement.php');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( $data )."&type=front&url=".HTTP_SERVER);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
if($response) {
$response_decode = (array)json_decode($response);
if(!empty($response_decode)) {
return $response_decode;
}
}
}

the URL 'http://ocdemo.velsof.com/velsof_advertisement.php' cannot be reached and the timeout is set to 5sec. This was in the header by vqmod and thats why every page load did take 5 sec to complete.

Newbie

Posts

Joined
Wed Aug 19, 2015 2:43 pm

Post by Von Grootel » Fri Aug 21, 2015 12:58 am

Hi ludwigloh.

I have the exact same problem and i'm so happy that i found your post!

Did you manage to solve it completely? I tried to lower the timeout to 1 sec and it has some effect, but unfortunately it's not as fast as it was before.

I'm looking forward to your reply.

Best Regards,

Von Grootel

Newbie

Posts

Joined
Sat Apr 07, 2012 5:58 am

Post by Von Grootel » Fri Aug 21, 2015 1:03 am

I got a reply from Velocity that the best solution is to just delete the velocity_menubar.xml.

Newbie

Posts

Joined
Sat Apr 07, 2012 5:58 am

Post by ludwigloh » Fri Aug 21, 2015 3:46 am

Von Grootel wrote:Hi ludwigloh.

I have the exact same problem and i'm so happy that i found your post!

Did you manage to solve it completely? I tried to lower the timeout to 1 sec and it has some effect, but unfortunately it's not as fast as it was before.

I'm looking forward to your reply.

Best Regards,

Von Grootel
Glad my post was of use! I'm not really sure what exactly this extension does? But I guess we want to keep it since we installed it in the first place. So what I did to resolve the problem was putting a new line stating 'return false;' just after the opening bracket of the affected function causing the function to exit as soon as something called it. Lightning fast admin now.

Newbie

Posts

Joined
Wed Aug 19, 2015 2:43 pm

Post by Von Grootel » Fri Aug 21, 2015 4:41 am

Hi Ludwigloh,

Velocity told me that the xml file was just to show the menu at the top bar. I deleted the file and now i have to go to extensions>modules to get at their modules if needed.

Again, many thanks for your post.


Best Regards,

Von Grootel

Newbie

Posts

Joined
Sat Apr 07, 2012 5:58 am

Post by ludwigloh » Fri Aug 21, 2015 7:03 pm

Great :)

Newbie

Posts

Joined
Wed Aug 19, 2015 2:43 pm
Who is online

Users browsing this forum: No registered users and 368 guests