PHP execution timeout in SqliteProfilerStorage - symfony

In my Symfony2 application, I am getting the following error at the time of login. If we refresh the page once again, the error will disappear.
Fatal error: Maximum execution time of 30 seconds exceeded
in SqliteProfilerStorage.php on line 84
What will be the reason?

Remove by hand the file in app/cache/dev/profiler.db. It happens when the DB size is getting big even on SSD disks.
You can add some 30s to exec time in php.ini.
If the situation will keep you can disable symfony profiler in config_dev.yml

Related

.Exist doesn't wait as per the given timeout in UFT14

I am trying to play my QTP11 scripts in the UFT14 (trail) but for some reason .Exist doesn't wait for the given timeout. Rather it is waiting as per the Object sync timeout project settings if the object doesn't exist. Any reason why?
Like my project's object sync timeout is set at 60 seconds. And when I use something like If ErrorObject.Exist(10) Then ErrorObject.Close -- this should wait for 10 seconds only but rather UFT14 is waiting for full 60 seconds. Is it a bug or is there any extra setting which I have to apply in UFT14 for Exist to wait for the given timeout only?
Edit - On further inspection I found out that this is an issue with Java objects only. So might be a bug in Java addin. Can anyone verify or provide a workaround.
Edit - HP acknowledged that this is an issue. Here is the link if anyone is interested.
https://softwaresupport.hpe.com/group/softwaresupport/search-result/-/facetsearch/document/KM02764499
This is because of the default timeout in UFT.You can change that default timeout as below
Test Settings -> Run -> Object synchronization timeout
Change the "Object synchronization timeout" in seconds.
Or You can do this directly through vbscript code
Setting("DefaultTimeout") = 5000(This value is in milliseconds)

On error a Symfony application hangs with browser continuously loading the page

As it turned out, this problem appears only when there is an error in the code.
A code without errors runs smooth, but as soon as there is even an 'undefined index' error, the whole server hangs, seems falling into sort of an endless loop.
The environment is Windows, Apache 2.4 from ApacheFriends, PHP 5.6, Symfony 2.3
It turned out to be a consequence of several issues:
Somewhere in the code someone put ini_set('max_execution_time', -1);
I am working with Doctrine.
I happen to process considerable amount of data
Twig, when trying to render an error page, attempts to var_dump() a backtrace.
And when using Doctrine, you know, it's better not to try `var_dump() a query result (or a back trace which is effectively the same).
After hardcoding values for memory_limit and max_execution_time using php_admin_value I was able to get the long sought error messages in the error log:
[13-Jul-2016 17:28:32] PHP Fatal error: Allowed memory size of 1280000000 bytes exhausted (tried to allocate 1245970432 bytes) in \vendor\twig\twig\lib\Twig\Extension\Debug.php on line 66
[13-Jul-2016 17:28:32] PHP Fatal error: Maximum execution time of 60 seconds exceeded in \vendor\symfony\symfony\src\Symfony\Component\Debug\ErrorHandler.php on line 136
Looks like Twig was choked by the back trace and then Symfony error handler for some reason hanged.
So I just commented out var_dump() in a Twig error handler and thus was able to make my system work.
Would like to see a better solution though.

Symfony2 - Random Failed to start the session

We have a site with Symfony2 with some traffic.
Every day the site begins to fail with this error for 1 or 2 minutes (15-20 errors). This occurs at random hours, could not find a pattern. It does not fit even to peak hours.
2015-10-09 02:23:57.635 [2015-10-09 06:23:38] request.CRITICAL: Uncaught PHP Exception RuntimeException: "Failed to start the session" at /var/www/thing.com/httpdocs/app/cache/prod/classes.php line 121 {"exception":"[object] (RuntimeException(code: 0): Failed to start the session at /var/www/thing.com/httpdocs/app/cache/prod/classes.php:121)"} []
Doesn't seem to be a double header problem or double start problem.
Site does not interact with any PHP legacy code that could be messing with the sessions.
Sessions are stored in the database so a file problem is discarded.
Lowered the session duration so the session table does not get too big and the problem persists.
Think It could be a problem with HWIOAuthBundle and it's facebook login, but cannot find where is the conflict.
Also the site uses a lot of render_esi for caching with Symfony2 internal cache system.
Update -------------------------------------------------
Emptied the /var/lib/php/sessions folder of older session files than were not being used.
Lowered the session lifespan. Sql entries in the sessions table went from ~3 Million to ~1.3 Million.
Seems that the problem is gone but this is not a real solution.
My guess is that the pdo_handler in symfony2 has a performance problem.
Maybe someone with more knowledge in this matter (pdo_handler, table optimization) can point a real solution for high traffic.
Where does your PHP installation save sessions to?
[You can find this in your php.ini file in the session.save_path setting, assuming you have CLI access]
It is very likely PHP uses your servers /tmp folder. If this folder is full at any point, then PHP can't create new sessions.
You can see the current size of your /tmp folder with:
du -ch /tmp/ |grep total
If, as is common, the /tmp folder is on its own partition, you can see its maximum size with :
df -h
Some programs can suddenly guzzle Gbs of this folder for their purposes.

How fix 502.3 error for ASP.NET app

one operation in our asp.net app is causing a HTTP 502 error right at 2 minutes of server side code running. failed request tracing confirms it's a timeout error (502 3). we've tried increasing executionTimeout on httpRuntime element to no avail. we believe the code does some sql queries then iterates through data - for now we just want to bump up the timeout so the app continues to run - any ideas which timeout setting we need to increase? #[Application Development] #[Technology Infrastructure] #urgent btw, we've duplicated this in our test environment

Error when running TcmReindex.exe

I am currently trying to get search working in my Tridion 2011 installation. I read in another article that I should run the TcmReIndex.exe tool in the Tridion/bin folder to re-index all my sites. So I tried this and it failed with a message box giving the following details
Unable to get list of Publication items.
Unable to Intialize TDSE object.
The wait operation timed out
Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=21054; handshake=35;
The wait operation timed out
A database error occurred while executing Stored Procedure "EDA_TRUSTEES_GETTRUSTEEETOKEN"
I have four fairly large publications (100 000+ items in total) which I am trying to index.
Any ideas?
Whenever I get "Unable to Intialize TDSE object." errors, I typically write a small test script using VBScript, and try running it on the CMS server. Whilst this does not directly solve the problem, it often gives some insight into the issue by logging information in the event viewer. Try creating a test.vbs file as follows and running it:
Set tdse = CreateObject("TDS.TDSE")
tdse.initialize()
msgbox(tdse.User.Description)
Set tdse = Nothing
If it throws any errors, please let me know, and it may help us solve the problem. If it gives you a popup with your user description, then I am completely barking up the wrong tree.
I haven't come to anything conclusive but it seems like my issue may have been a temporary one as it just started working. I did increase all timeouts in Tridion MMC > Timeout Settings by 100 times their amounts but I suspect that this wasn't the issue, when it works the connection is almost instant.
If anyone else has this issue
Restart the computer the content manager is installed on, try again.
Wait an hour or two, try again.
Increase timeouts, try again.
I've run the process a few more times and it seems to be working correctly.

Resources