Meteor, MUP & Cloudflare causing redirect/refresh loop - ssl

I have a meteor webapp that has been around for a few years. It hasn't been updated particularly often and thus the version is little bit old (Meteor 1.6.1.4), however it runs locally without an issue and I currently have a version of it it deployed without issue on a Digital Ocean droplet with Mongo on AtlasDB and the DNS on Cloudflare.
However I've been running into an issue deploying updates with the Meteor Up (MUP) tool. On my production server when I run mup deploy with my latest code the deployment works and validates successfully, however the live site now loops on page load. The page completes the load (including a call to Stripe API front end library) and the images load and as soon as that has happened the same page is loaded again over and over. This happens on each page of the webapp. There are no errors logged in the console.
I'm almost sure this isn't a codebase issue as I have a staging version of this same app running on an identical spec droplet which I can deploy to without issue. The only difference between the production and staging is that the staging uses a LetsEncrypt cert generated by MUP and production uses a Cloudflare issued cert. I can't remember exactly the reason for this as it was the outcome of my last round of troubleshooting, which did result in a successful deployment. The LetsEncrypt configuration with MUP seemed to be problematic when I last set everything up. Either way there is no obvious good reason why this error should occur.
So I think that the issue is most likely something to do with Cloudflare, however I don't have many clues as to what. I've tried clearing the full cache after deploying. I cannot disable the Cloudflare proxy as I get unsecure error.
For my next steps I'm thinking of setting up another staging droplet but with Cloudflare in front in the same way, to see if I can get a non-critical replicable version of the same error. From there I'm not sure what I would do to debug and fix. I was also wondering if configuring a load balancer for this webapp might be smart at this moment, though if in an SSL passthrough I wonder if it would not solve the underlying issue. This would also not necessarily be answering this question but rather just avoiding it. I'm also considering trying to update the version of the Meteor app as far as I can to see if there is any chance that codebase is part of the issue.
Any suggestions?

Related

Cloudflare - Custom URL Purge not working on different accounts

What is the issue with Cloudflare custom URL purge caching not working on different accounts? Bascially I have the account, and this functionality does work, but my colleague who lives in USA, I live in Europe, for her this does not work.
Can the issues be with account settings? Basically she gets the error or sometimes the cache does not want to work
I've faced issues in the past where features in Cloudflare was not working due to plugins or browser configuration. First you should confirm if the error is indeed coming from Cloudflare or from the browser.
Ask her to try to use a different browser and also a different device to confirm the issue is either tied to the account or to her location.
Try to inspect the page when performing the action to try and find out what's happening behind the scenes.

My Openshift app (free plan) keeps disapearing after few days

Does anymore same experience or solution for that ?
My app works fine only several days after deployment, after that it turns to blank screen with "Not Found" text on it.
App is with "WildFly Application Server 8.2.1.Final" Cartridge with status "Started" - note that I am aware of iddling of apps at Openshift, this is not the case.
Recieved reply from OpenShift as following :
It looks like you're hosting your app on a small gear. The WildFly cartridge could be quite memory consuming, depending on what app you are deploying. Please check whether the gear is not having memory issues, as described
https://developers.openshift.com/faq/troubleshooting.html#_why_is_my_application_restarting_automatically_or_having_memory_issues
If there seems to be no memory issues, please check your log files for further information about the problem. You can check your log files by using the 'rhc tail' command, or by sshing into your application and looking in the ~/app-root/logs directory.
You can learn more about checking your log files in our Developer Portal (https://developers.openshift.com/en/managing-log-files.html)

Apache Crash Dialog

I'm running XAMPP on my windows machine and experiencing a problem with Apache crashing a couple times a day. When it does, a dialog pops up and I have to manually tell windows to end the program. After I do that, XAMPP automatically starts it back up in a couple of seconds with no issues. When it crashes while I'm not home though, the server is down until I get back. So I have two questions:
Are periodic crashes something that should be expected, or is this indicative of another issue I should be trying to pinpoint?
If this is something I should just learn to deal with, is there a way to automatically restart httpd.exe when these issues occur, so I don't experience down time when I'm away from home?
You'd look into log files, especially the Apache access and error logs, to see what happened, when you are not at home. I've met some similar situation: I have a problematic PHP script hosted on my server, when someone visits the page, it leads to an Apache crash.
I'd suggest you do the investigation as follows:
Search the timestamp of recent Apache restart.
Check the Apache access log to see whether there are some scripts have been accessed.
Manually access these scripts in your browser (to see if Apache will crash again)
You'd better check the PHP error log as well.
If there is really nothing suspicious, you can try WAMP bundle alternatively, which is also a very popular PHP development environment and it is stable.
Although there aren't many cases in which one should "expect" periodic crashes, in this case you are better of reconsidering your setup. From the frontpage of the XAMPP site:
XAMPP is the most popular PHP development environment
Sure, you can use it as "production" server, but XAMPP isn't build for hosting websites, it is intended as development server, so you don't have to manually setup Apache, PHP and MySQL on you dev machine. If you actually want to run your website for the public, setup Apache/IIS, MySQL and PHP manually, those products on there own are made for running in production. Or you can consider getting some cheap shared hosting somewhere, so you don't need to setup anything.

ASP.MVC 4, Azure Caching: Error on both local and remote - "role discovery data is unavailable"

Whew...ok, been wrestling with this for a while and I can't figure out what is going on.
I am new to Azure caching, but at this point I have read a good bit and I think I have it setup right, but something is obviously wrong so what do I know?
Ok, so first I setup a dedicated caching web worker role using this fine tutorial: http://berniecook.wordpress.com/2013/01/27/distributed-caching-in-azure-cache-worker-role/
I have an ASP.net MVC 4 website that is supposed to be using it.
I have my solution set to multiple starting projects with my cloud caching project set to start first, but no matter what I do, I get the "role discovery data is unavailable".
Sometimes in my output log I get that the Role Environment failed to initialize, but not very often. Most of the time the output log says that is succeeds. Regardless of that, I still get the error above.
I was thinking that maybe the issue was because I was running on local azure storage and compute emulators, so I reconfigured and published the Cloud Service to Azure to see if that helped.
It didn't...
The fun part is that there have been exactly 2 times when it suddenly worked (both when I was working locally). 2 times about of about 100. I didn't do anything different...just ran the debugger and poof, it all worked. This at least lends a bit of credit that it is actually setup correctly.
Needless to say, this is putting a huge damper on my productivity so any advice would be appreciated.
Update
Ok, I have figured out a workaround of sorts...I have learned that the reason that it consistently failed was because the development web server was holding onto a file which prevented the caching server to launch correctly.
The workaround is to stop the web server each and every time I want to recompile and run the code. This is obviously not ideal, so any ways to make this more reliable would be appreciated.
Thanks,
David
I don't know if this helps but I find that if I don't shut down the both the storage and compute emulator, I get weird errors, so after doing an F5 and closing the browser down, I manually shut down both emulators

Website sometimes gets jammed(timeout)

I'm hosting my website www.xgclan.com with the latest apache 2.4.1 and sometimes my server gets jammed, it doesn't seem to send any data but you don't get a timeout like when the Apache process isn't running.
A reboot of the process resolves this issue.
It seems to happen when you open the website in multiple browsers on the same system.
I've tested it on 2 different systems to make sure its not a bandwith or cpu problem.
Putting this without the quotes "AcceptFilter http none" in the httpd.conf fixed the issue for me.
I found the solution here: http://www.apachelounge.com/viewtopic.php?t=4543&postdays=0&postorder=asc&start=20