Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error when adding comment #363

Open
leoloso opened this issue Feb 5, 2018 · 4 comments
Open

Internal server error when adding comment #363

leoloso opened this issue Feb 5, 2018 · 4 comments
Assignees
Labels

Comments

@leoloso
Copy link

leoloso commented Feb 5, 2018

- Do you want to request a feature or report a bug?
Bug

- What is the current behavior?
2 problems:

  1. When I add a particular comment, I get an internal server error
  2. The "posting" keeps spinning forever, it doesn't inform the user that there was an error

Check the console in the screenshot:

comment-error

The comment is this one:

Hi Todd, this solution does not remove the need for a server (as Netlify does), but it offloads the traffic from the server to the CDN, for all content (without user state) that has already been generated by some other user browsing the site in the same region. Hence, you will still need to pay for 1 server, but most likely it will be enough, so you will save money if you have a high-traffic website that usually requires 2 or more servers.

And it is faster since you're reducing the latency to fetch data from a CDN (which is near the user) over the server. To test how much of a difference, you can execute the command below 2 times: the first time will be a miss from CloudFront, and the 2nd will be a hit, and then calculate the time difference (you can change the value of param "tp" randomly to get a miss again):

curl -o /dev/null -s -w %{time_total} "https://content.getpop.org/en/?output=json&&tp=1000"

The PoP website is hosted in US North Virginia, and I'm currently in London. When I execute this command, the first time I get the response in 1.693777 sec, and the 2nd time in 0.659450 sec, so it's shaving a full 1 second, per request.

@indysigner
Copy link
Contributor

indysigner commented Feb 6, 2018

Yeah, having the same issue with this particular comment... please have a look @biilmann @pukhalski

The article is: https://www.smashingmagazine.com/2018/02/dynamic-website-static-content-cdn/

and I'm getting an errror 500 when trying to post this comment. Curly quotes or html quotes didn’t help either.

@leoloso
Copy link
Author

leoloso commented Feb 6, 2018

The issue is the "/", replacing with "/" did work.

This fails:

curl -o /dev/null -s -w %{time_total} "https://content.getpop.org/en/?output=json&tp=RANDOM_NUMBER_HERE"

This works:

curl -o \/dev\/null -s -w %{time_total} "https:\/\/content.getpop.org\/en\/?output=json&tp=RANDOM_NUMBER_HERE"

@indysigner
Copy link
Contributor

Cool, we’ll have Ilya looking into this soon!

@leoloso
Copy link
Author

leoloso commented Mar 16, 2018

I added a comment on Smashing the other day, and this error is still happening. Then I had to escape the URL, adding "\" before each "/", making the URL look very ugly and not clickable (the link is never added).

I wonder if this is happening to everyone? If that's the case, you may currently have less comments than could be, from people adding URLs in their comments, failing, and then giving up...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants