Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Standup 10/7/10: Apache –with-mpm compile option, IE && Rafael && jQuery, Modulr

Help

“Some of our requests are not timing out in the time specified in our mod_proxy settings in Apache.”

This team’s problem was later refined to the fact that these timeout settings were not being respected on all requests when the server hit a spike in load. The solution is to recompile Apache with the –with-mpm=worker option. The default option value is –with-mpm=prefork. With Apache compiled with the ‘worker’ value all requests respect the timeout settings.

“When using Rafael and jQuery together in our project our click handlers throw errors in IE 7 and 8″

After further investigation IE seems to keep propagating the click event even though it was handled. The following javascript was added only in IE browsers to make it behave like the other browsers.

if(document.attachEvent) {
  $(divContainingCanvas).find("*").click(function(event) {
    event.stopPropagation();
  });
}

Interesting

Modulr is a Ruby implementation of a CommonJS module that combines your multiple javascript files into a single file that is executed in dependency order. It does this by ordering the execution of your code by the require() method call. What’s interesting is that you can collapse your NodeJS code into a single file to include in a browser and run Jasmine tests against. This is possible because NodeJS uses require() to link your dependent files together.

Comments
  1. JT Archie says:

    An addition to the Raphael and jQuery issues, we were able to simplify the code. It appears that the propogation only happens on the containing div of the canvas, so instead of attaching no-op click handler to all elements in the div, we can just attach it to the div tag.

    “if(document.attachEvent) {
    $(divContainingCanvas).click(function(event) {
    event.stopPropagation();
    });
    }

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *