Mass Punch timeout

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Locked
reloded
Posts: 52
Joined: Mon Aug 13, 2007 10:24 pm

Mass Punch timeout

Post by reloded »

Hi.
I've been trying to add mass punches but am having issues. When I import employees and do the first mass punch, (Normal-IN), all goes well, however, for the next punch, (Lunch-Out), the process terminates/times-out at 63%. Thought it was a browser issue so I changed went from Firefox to IE but the same thing happens.

The only time I am able to mass punch successfully is when I select about 10 employees. If I select more than 15, it times out at 63% and non of the punches are imported.

Another thing with the mass punch:
I was punching from
Start date: July 1st 2007
End Date: September 21st 2007
When I mass punch successfully then click on continue, I see that the end date has switched to 1st August 2007. Is timetrex trying to say something?
However though, when I check the punches to confirm, I see they've gone till 21st Sep 2007
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

What is actually timing out?

Did you check your PHP error log for any errors? It could be your PHP timeout is being reached, or memory limit. The error log will tell you this.

As for the end date issue, its not trying to tell you anything, it sounds like some sort of odd date parsing issue... What is the date format you are using in TimeTrex?
reloded
Posts: 52
Joined: Mon Aug 13, 2007 10:24 pm

Post by reloded »

What is actually timing out?
Mass punching times out. It doesn't complete. This I can tell by the mass punch progress bar. It shows punches being made and then it halts somewhere in the middle.

I've checked apache2/error.log and this is what I see

Code: Select all

[Wed Sep 26 11:14:45 2007] [error] [client 172.16.1.2] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 6815632 bytes) in /var/www/hrsoft/classes/modules/core/Profiler.class.php on line 229, referer: http://172.16.1.5/hrsoft/interface//progress_bar/ProgressBarControl.php?action=add_mass_punch&filter_user_id[0]=1&filter_user_id[1]=498&filter_user_id[2]=499&filter_
user_id[3]=500&filter_user_id[4]=519&filter_user_id[5]=501&filter_user_id[6]=502&filter_user_id[7]=503&filter_user_id[8]=521&filter_user_id[9]=522&filter_user_id[10]=
523&filter_user_id[11]=520&filter_user_id[12]=511&filter_user_id[13]=505&filter_user_id[14]=506&filter_user_id[15]=507&filter_user_id[16]=509&filter_user_id[17]=515&filter_user_id[18]=
510&filter_user_id[19]=479&filter_user_id[20]=513&filter_user_id[21]=514&filter_user_id[22]=516&filter_user_id[23]=517&data[time_stamp]=1185962400&data[start_date_stamp]=
1185915600&data[end_date_stamp]=1188594000&data[dow][1]=1&data[dow][2]=1&data[dow][3]=1&data[dow][4]=1&data[dow][5]=1&data[type_id]=20&data[status_id]=20&data[branch_id]=
-1&data[department_id]=-1&data[note]=lunch%20time&data[start_punch_full_time_stamp]=1185962400&data[end_punch_full_time_stamp]=1190368800
I see the PHP Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 6815632 bytes)
Is it the cause of the incomplete mass punches? Should I increase my memory? In my php.ini I have memory limit as 128MB

I know this is more of php than timetrex, but, will the settings in my php.ini affect execution of long transactions e.g. punches?

Code: Select all

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30     ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 128M      ; Maximum amount of memory a script may consume (128MB)
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

Yes, PHP has all sorts of limits that could affect how things work in TimeTrex, especially if you have debugging mode enabled.

It usually doesn't hurt things to increase the memory limit and timeout settings by quite a bit. Try something like this:

memory_limit = 512M
max_execution_time = 1800

That should help quite a bit. You may also want to disable all the debugging settings in your timetrex.ini.php during normal use, as that will reduce the amount of memory that it uses.
Locked