51Degrees / Device-Detection

THE Fastest and most Accurate device detection for C / PHP / Perl / Python and Node.js - professionally maintained device data
https://51degrees.com/device-detection
Other
112 stars 46 forks source link

Slow test during nginx -t with version R11. #32

Closed tibiiorcdw closed 5 years ago

tibiiorcdw commented 5 years ago

nginx/1.11.5 (nginx-plus-r11): We have noticed that after doing an nginx -t command, the configuration test results take time to come back when the 51Degree module pattern is loaded vs. when it is not. Is this is a normal behavior?

JoshGrew51D commented 5 years ago

We would expect it to take longer due to the fact it is loading the data file. How long does it take with the module loaded, is it a significant amount of time?

tibiiorcdw commented 5 years ago

It seems to take sometime up to 10 seconds.

JoshGrew51D commented 5 years ago

That is longer than what we usually see. Did you compile the module yourself or use the already available 1.11.5 version?

Have you noticed any performance issues with the module itself outside of testing the configuration?

Are you able to send over the 51Degrees references in your config?

tibiiorcdw commented 5 years ago

We are using the module from your project (GitHub). We do not notice an issue during the runtime requests. Here are the 51D configuration lines in nginx.conf and default.conf (where we tested on).

nginx.conf

load_module modules/ngx_http_51D_pattern_module-1.11.5.so;

51D_filePath /etc/nginx/modules/data/51Degrees-EnterpriseV3_2.dat; 51D_cache 10000;

51D_match_single x-user-agent-match HardwareName,BrowserName,PlatformName; 51D_match_all x-mobile IsMobile; 51D_match_all x-tablet IsTablet;

default.conf

51D_match_single x-user-agent-match HardwareName,BrowserName,PlatformName; 51D_match_all x-mobile IsMobile; 51D_match_all x-tablet IsTablet;

add_header x-mobile $http_x_mobile; add_header x-tablet $http_x_tablet;

I hope this is what you are looking for.

Thank you.

JoshGrew51D commented 5 years ago

Thanks for the extra information. It's tough to say why but the first thing to do would be to make sure the module you are running is using our up to date code. I believe the pre-compiled modules we have need updating.

If you drop us an Email at support@51degrees.com I can send over an updated version. We will look into releasing them soon.

JoshGrew51D commented 5 years ago

Closing this as the issue has been resolved by using a newly compiled version of 1.11.5. We will be working to release updated versions of the pre-built modules.