Before moving on I want to mention that I have tried to look for answers in the web but in vain.
I am tasked with investigating why our CakePHP-based website is no longer working on our staging server. When loading the site at times it loads completely, but when logging a user in it takes forever to authenticate such that it produces an Internal Server Error.
Step 1: I have checked the cache directory for both persistent and models and they are clean.
Step 2: The Configure::write value for debug is already set to 2. Nothing gets written on the error.log file.
Could this have anything to do with Session data? I am trying to figure out what's going on and I have tried looking into the lib folder for Cake to see if I can edit the files in there to actually see what the website actually outputs instead of the Internal Server Error message. Which file should I edit in there? I followed this link but it seems like the core is a different version.
It turned out that there was an issue with a SAP Server connection which kept the pages on the loop until they timeout resulting into an internal server error. This is evident of the fact that the live website was working fine.
I think the best solution would be to tweak the SAP Server connection component such that it doesn't timeout requests. As much as I lack knowledge of the technology. I have disabled the call and everything worked fine at a speed of light.
Related
Up until recently any error messages laravel would produce were written to /app/storage/logs on Azure, as they are supposed to. They still do locally, and my live server uses the exact same laravel-configuration. However, on my live server laravel stopped writing to the log files about 2 months ago.
Log::Info still works, but unless I tell it to write something to the logs it doesn't.
As it works locally and the exact same configuration is live, I don't know where I should start looking, and googling has revealed to be fruitless. I'm sorry I have not included any images or code, but I am completely clueless what could cause the error. Maybe it has something to do with writing privileges? Any ideas?
Progress 1: When something is supposed to be written to the logs-folder, the "Most recently modified at"-date changes to current date and time. However, nothing inside the folder changes.
Progress 2: An error was just printed to the log, but not all errors are printed. There is an imagick error that should be printed to the log that currently isn't, but the fact that another error message was printed changes the entire question. Just found out, going to test some stuff now.
Progress 3: I have confirmed that the only thing not printed to the log is when imagick fails to load a pdf. There are other cases of this particular problem of imagick happening on a windows server, where reading pdf:s causes imagick to crash without any error message. This means that this question is no longer relevant, thank you for all your time people.
You may check whether the disk space is full of your App Service, if so, it may raise your issue.
And every App Service pricing tier has a limit disk space and will shared in all the web apps in this App Service plan.
You can check the metric on dashboard page of your web app portal, e.g.
You can refer to https://azure.microsoft.com/en-us/pricing/details/app-service/ for details.
As a workaround, you can build a web job to run a script continuously to move your old log files to Azure Blob Storage or a database, to save storage space in App Service.
I have a cakephp (1.3.10) application that seemed to work fine, but recently I get an error page that shows "No data received" in chrome. This happens randomly on various pages and in various browsers. I googled the the error and found only unrelated information.
I haven't changed any code or upgraded the framework nor did we do any updates on the server that is running the application.
What could be the cause of this?
Is this code related, if so where can I start looking to solve it in cakephp?
Any help will be greatly appreciated.
"No data received" could mean
A problem in the web server
a PHP script dying due toe a fatal error (although I think a 200 should always be emitted... depends on the server configuration I guess).
If you're using Apache, check out its error.log first. Chances are there is something enlightening in there.
If that doesn't help, you could try logging your PHP errors into a file.
If it happens randomly it might be an issue with your script running into an timeout or using too much memory. I had this issue once with wordpress as wordpress sometimes calls an internal "cronjob" on page views from time to time.
I have one Zend project developed on my server (where everything works fine), but when i transferred it to production server I keep getting the Internal Server Error message and the website won't work.
What I can't understand is that the admin part (www.mysite.com/admin) works fine, but when I try to access website (www.mysite.com) it interrupts.
I know this is a really long shot, but does anyone have any suggestion where to start searching for the cause of the problem?
Up to my knowledge the 500 error is generated when the web server does not get an answer back from scripting engine in time, which would be PHP in case of Zend. It would be interesting to know if you receive this error immediately or after some time. If it takes some time your application may be hanging in a loop.
So we have a drupal 6 website that is running good, but now we want to prepare it for a lot of traffic, so the next step is to have 2 web servers running the same site (the database is already running on a separate server) and then use a another server to do the load balancing between those 2.
So yesterday i mirrored the files of the original drupal server (that runs at lets say www.example.com) to the new server (that runs at lets say 123.123.123.123 - just an IP, no domain), than i edited the settings.php file of the second one to make sure that the base url is 123.123.123.123.
once i browsed to 123.123.123.123 to test out if the mirror of the site was working, i got a blank page.. looking at the source, the basic structure was there, but no content, and the CSS was pointing to the right place but still not showing.. I decided to browse to 123.123.123.123/admin/ and see what i could do.. went to the site performance and cleared the cache, didn't do a thing but then i noticed the original drupal was now showing blank... so i went to www.example.com/admin/, cleared the cache also, site was back, but it appeared the menu router was destroyed because i was getting "page not found" everywhere. So i went to the modules page and clicked save hopping that it would rebuild the menu router. It did the trick, site was back online and working good.
Obviously i stopped poking around with 123.123.123.123 and decided it was time to ask for some help from the experts...
What am i doing wrong? Any help would be greatly appreciated!!
Julien
I don't think that out of the box you can do this with D6.
There are a couple of things which will catch you out.
Settings are stored in the database so if your servers are not identical one server will not work.
The database is not set up to work with more than one server accessing it. This could cause race conditions or deadlocks.
Uploaded or generated files will not be mirrored on both servers so files will be missing.
Probably other things too but this is enough to be going on with.
So you have two options:
Go with something like pressflow which is D6 compatible and has options for working on mirrored servers.
Configure your server to handle the load.
Configuring your server may be a good starting point. Here are some tips
make sure Drupal caching is turned on
Use an optcode cache like apc, see some benchmarks here
Install cache router module to use apc for Drupal's cache
install Boost module
There is a much more in depth article here
I would suggest reading the article and doing everything you can on one server. While it is possible to go to 2 or even 200 servers it adds a lot of complexity to your system.
I'm running Apache 2.046 with PHP 5.x and I am experiencing very odd behavior on a CodeIgniter app.
The frustrating thing is that it is not consistent.
Occasionally when I call up my app Apache returns nothing. I mean nada. But then I hit refresh and everything works as expected. Sometimes I have to hit "refreash" several times before the page will load. Other times it comes right up. When I started this post it was happening 80-90% of the time. Now I can't seem to make it happen. But it's been happening for several days so I have confidence in the next couple of page visits I will see it again.
This is on a development box that has very little traffic. When I do a PS I see several HTTP threads running - "top" reveals nothing un-expected (like a runaway process).
When I tail the apache access logs I don't even see a logged request when Apache returns blank. No Apache or PHP errors are being thrown.
I mention codeIgniter mostly because we're using the recommend .htaccess file with Mod Rewrite. So I wasn't sure if that was contributing to the issue. It also does not seem to be a problem with non-codeIgniter apps. That's hard to say with confidence since the issue is so inconsistent.
It does not seem to be client issue as we're seeing this happen from multiple client machines.
I can't tell if this is a server (hardware) issue, Apache issue or coding issue. Maybe it's a memory issue?
Any thoughts?
NEW INFORMATION:
IN the PHP log file I received this:
PHP Fatal error: fatal flex scanner internal error--end of buffer missed in /data/www/coreLib/codeIgniter/system/libraries/Hooks.php on line 226
Blank pages when using CI are usually caused by php errors with error messages suppressed.
Try re-enabling them and reloading.
error_reporting(E_ALL|E_WARNING)
If you suspect your Rewrite rules are the source of the problem, then crank mod_rewrite's logging level up and find out. Otherwise, the fact that everything works normally outside of your app makes this sound like it's a problem with your code or possibly the framework itself.