Tagged: ERR_EMPTY_RESPONSE
-
AuthorPosts
-
September 9, 2014 at 9:53 am #315716
Hi there,
I have many portfolio items on my site, every one has a buynow button with a different target link. I want to track this buynow button clicks using Google Analytics. For that i have to insert “onclick=”ga(‘send’, ‘event’, ‘Buy Button’, ‘Resume’, ‘Resume Template Download’);” event inside anchor tag of buynow button.Button shortcode is : [av_button label='Buy Now' link='manually,https://guru99.dpdcart.com/cart/add?product_id=93092&method_id=97551' link_target='' color='theme-color' custom_bg='#444444' custom_font='#ffffff' size='small' position='left' icon_select='yes' icon='ue859' font='entypo-fontello']
I have many portfolio items like this which contains Buy now button and want to track them all.
I read following two support tickets but didn’t get any idea
1. https://kriesi.at/support/topic/add-cross-domain-tracking-code/
2. https://kriesi.at/support/topic/ga-event-tracking-a-portfolio-item-external-link/Link to my site : http://career.guru99.com/premium/templates/vip-resume-template/
Any help appreciated.
RegardsSeptember 9, 2014 at 4:09 pm #315947Hi kriru!
Thank you for using Enfold.
Please add a unique selector for every buy now avia button. Refer to this link how: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/
Let’s use “ga-buy” for example. Add this at the very bottom of functions.php to add the onclick attribute on the buy button with the “ga-buy” custom css class:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery('.ga-buy a').attr('onclick', 'ga(\'send\', \'event\', \'Buy Button\', \'Resume\', \'Resume Template Download\')\;'); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Cheers!
IsmaelJanuary 21, 2015 at 4:40 pm #383109This is awesome. How would you track multiple events on the same page, with different labels? Let’s say 2 buttons(above and below fold) and 2-3 different text links? Thanks.
January 22, 2015 at 11:13 am #383588Hi!
Add a unique class attribute on the buttons and text then modify the script above:
function add_custom_script(){ ?> <script> jQuery(window).load(function(){ jQuery('.ga-buy-1 a').attr('onclick', 'ga(\'send\', \'event\', \'Buy Button\', \'Resume\', \'Resume Template Download\')\;'); jQuery('.ga-buy-2 a').attr('onclick', 'ga(\'send\', \'event\', \'Buy Button\', \'Resume\', \'Resume Template Download\')\;'); jQuery('.ga-buy-3 a').attr('onclick', 'ga(\'send\', \'event\', \'Buy Button\', \'Resume\', \'Resume Template Download\')\;'); }); </script> <?php } add_action('wp_footer', 'add_custom_script');
Regards,
IsmaelJune 5, 2015 at 5:58 pm #455205Here is a quick update, for those who might run into this in the future. This does work. However, if you have too many events(I had 42 – to track each individual element, such as buttons, images and text links, on 3 different pages) it might get your IP temporarily banned with your provider. When this happens to me, I get a “ERR_EMPTY_RESPONSE” message and I can’t access the site for 2-3 minutes. This makes it impossible to even edit a page. I read that it might be because I am with GoDaddy and they limit the number of post requests for security reasons.
After turning off all the plugins and uploading a fresh copy of the theme, I started removing the snippets that I added to the theme files and this javascript (unfortunately) turned out to be what was causing the problem.
Is it possible to do it differently, or do I just have to limit the number of events that I am tracking?
June 5, 2015 at 6:57 pm #455248P.S.
The I/O on my hosting account gets maxed out @ the highest resource level when I try to edit a page, while using the
JS in functions.php.June 8, 2015 at 5:20 am #455702Hi!
Sorry for the late reply, I think tracking 42 events might be a bit high. Could you try to limit them a bit to see what amount works without causing any problems?
Regards,
RikardJune 8, 2015 at 5:01 pm #456200Thanks for your reply. Better late than never ;) it is very welcome.
Something is blowing my I/O usage through the roof and it gets my IP address temporarily banned (1-2 minutes I get ERR_EMPTY_RESPONSE message) . I can’t do simple stuff such as edit a page, or even view it when this happens. The javascript and the events are just the cherry on top. It’s what maxes out the I/O on my hosting. I’ve tried to narrow it down, took down plugins and installed WordFence, but I can’t find a trend. My raw server logs show my IP address as the one generating a lot of requests.June 9, 2015 at 8:03 am #456491Hey!
Looks like this is a common issue with GoDaddy. I found a lot of inquiries regarding the issue but found no conclusive solution for it:
https://wordpress.org/support/topic/err_empty_response
https://wordpress.org/support/topic/error-code-err_empty_response-1
https://wordpress.org/support/topic/err_empty_response?replies=18
https://wordpress.org/support/topic/someone-please-help-err_empty_responseYou can see the Godaddy signature all over the place. Have you tried to contact your hosting provider?
Best regards,
IsmaelJune 9, 2015 at 1:10 pm #456666Hey Ismael,
Yes, I have contacted Godaddy. They’re saying that something is heavily using the I/O resources and I have to figure out what that is, before the website will function properly. I have read that other people have issues with their IP getting temporarily blocked, because it makes too many requests and a solution would be contacting the provider and whitelisting the IP. I have told them so, but they pointed out that something or multiple somethings is/are generating a lot of traffic for my I/O to spike up like that. I have seen it myself, when I try to edit or save a page, my I/O jumps at 2 MB/s, which is the highest resource plan for hosting. So, they are saying that even if they whitelist my IP, it will automatically get banned again the next time when the disk usage spikes up.
This only seems to happen when I edit/save a page. If I take down all the plugins, it does work, although there is no particular plugin that causes the problem.
So, is there anything that can be done. And, this maybe a stupid question, but is there a plugin/way to slow down or change how the requests to the server are made when editing pages?
Thanks,
SilviuJune 9, 2015 at 2:03 pm #456701P.S. I have also gone through the visitor logs. admin-ajax get called at least every 2 minutes, or even several times per minute, from my own address. The most frequent referrer is the url of one of my pages getting updated /wp-admin/post.php?post=307&action=edit ; user agent Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 . Should I worry that this happens every 2 minutes, even at 1 am when I was peacefully sleeping?
June 10, 2015 at 3:58 am #456968Update: Godaddy moved me from CPanel to Managed WordPress Hosting because, after 2×2 hour phone calls they couldn’t tell what was happening. I will keep you posted if this solves the problem or not, for your future reference. Sorry about all the ruckus ;)
June 10, 2015 at 9:57 am #457071Hey!
Honestly, I haven’t tried monitoring a WordPress installation server before so I’m not familiar on server activities and/or any server related troubleshooting procedure. Anyway, what is that page specifically? Please give us a temporary login details so that we can check it. It’s kinda weird that the ajax script is being executed even when you’re not editing or using the dashboard.
I’m not sure if this is going to help but it can help speed up the dashboard, and maybe, with enough luck fix the issue at hand. Add this at the very bottom of wp-config.php file:
define('CONCATENATE_SCRIPTS', false );
Best regards,
IsmaelJune 10, 2015 at 6:05 pm #457438Thanks, but so far the issue is solved and there is nothing to test. Now I am on a Managed WordPress environment, so I have much less control over the hosting account than with the CPanel.
When I migrated my sites to the CPanel, last year, I had some include errors pop up and the sites were not displaying correctly. After doing some research, I found out that rolling back the Php version on the server will correct the issues and I asked GoDaddy to do just that. Now, that was one of the possible causes for all the issues that I had(Php version not being compatible with the security updates that GoDaddy implemented?).
So, to sum it up – GoDaddy did some changes to their server security to guard against WordPress attacks. In some cases, those updates are causing that Err_Empty_Response Error and the offending IP is temporarily banned(for 2-3 minutes). Switching me to another type of hosting was their solution in my case. It’s working fine, so far.
Thanks, I’ll keep you posted if I find out anything else.
June 12, 2015 at 4:52 am #458152Hey!
Great, please let us know if you should need any more help on the topic.
Cheers!
RikardJune 18, 2015 at 11:52 pm #461633Here’s Godaddy’s response to my inquiries. They’ve been somewhat helpful after I pointed out that the error is due to their new security rules. I still get the error, but much less often after they’ve switched me to Managed WordPress hosting. I am posting this for anyone else that gets this error in the future. Moderator – maybe you should consider moving the Empty_Response posts to their own thread? Thanks.
Dear Sir or Madam,
I am a member of Hosting Support, contacting you in regard to “err_empty response” error message you’ve been encountering intermittently when working on your WordPress site.
These errors on Linux Web Hosting accounts are due to MOD_SEC rules on our servers. The system relies on sets of scoring parameters to detect automation and spam. Repeated actions (i.e. excessive logins) from the exact same client to the same site will generally be the trigger. Over time though, this gets auto-unblocked.
Here are a few other reasons as to why you may be encountering the Connection Reset error:
1. You may have a malware/virus that is saved somewhere on the computer, possibly a tracking cookie.
Solution: You may want to run a scanner to review your computer for any malware or virus.2. Local robots cache/cookie signatures can get their IP temporarily blacklisted.
Solution: Please clear your browser’s cache & cookies or try a Private Browsing session.3. A cache/cookie from a previous login, causes the user will continue to try the login over and over.
Solution: Please clear your browser’s cache & cookies or try a Private Browsing session.4. A saved cache/cookie data could attempt a POST to login over and over.
Solution: Please clear your browser’s cache & cookies or try a Private Browsing session.5. Review scripts to ensure repeated rapid POST/GET requests are not being made.
There are two types of requests – one is a POST request and the second is a GET request. A POST request is used to send your data through the internet and network sources to a visitor’s computer. During this process, a POST request may “post” information in multiple places, such as your WordPress administrative panel, the WordPress database, and your local computer’s cache. Each one of these posts equals one HTTP request. The following information further details POST requests:
POST requests are never cached
POST requests do not remain in the browser history
POST requests cannot be bookmarked
POST requests have no restrictions on data lengthThe second HTTP request is a GET request, which is the request sent to your WordPress content from each visitor, search engine, or social media option such as Twitter, Facebook, or similar. If you have 10 visitors attempting to view the website via Facebook or directly entering the URL into a browser, you have 10 HTTP requests, which are operating at the same time as POST requests and all converging on the same WordPress content and database. Please note, GET requests are where you may be exceeding the HTTP requests and the following details the GET requests:
GET requests can be cached
GET requests remain in the browser history
GET requests can be bookmarked
GET requests should never be used when dealing with sensitive data
GET requests have length restrictions
GET requests should be used only to retrieve dataThe following table lists some other HTTP request methods:
Method Description
HEAD Same as GET but returns only HTTP headers and no document body
PUT Uploads a representation of the specified URI
DELETE Deletes the specified resource
OPTIONS Returns the HTTP methods that the server supports
CONNECT Converts the request connection to a transparent TCP/IP tunnelThe following table compares the two HTTP methods: GET and POST.
GET POST
BACK button/Reload Harmless Data will be re-submitted (the browser should alert the user that the data are about to be re-submitted)
Bookmarked Can be bookmarked Cannot be bookmarked
Cached Can be cached Not cached
Encoding type application/x-www-form-urlencoded application/x-www-form-urlencoded or multipart/form-data. Use multipart encoding for binary data
History Parameters remain in browser history Parameters are not saved in browser history
Restrictions on data length Yes, when sending data, the GET method adds the data to the URL; and the length of a URL is limited (maximum URL length is 2048 characters) No restrictions
Restrictions on data type Only ASCII characters allowed No restrictions. Binary data is also allowed
Security GET is less secure compared to POST because data sent is part of the URLNever use GET when sending passwords or other sensitive information! POST is a little safer than GET because the parameters are not stored in browser history or in web server logs
Visibility Data is visible to everyone in the URL Data is not displayed in the URLPlease let us know if we can assist you in any other way.
June 19, 2015 at 3:57 pm #462006Hi!
thanks for sharing this with us!
Let us know in a new ticket in case you have some new issues or questions. We are happy to assist.
Best regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.