Scopes in memory: Session

Hi we just updated our productin environment to lucee, and it has not been as bas as expected. Couple issues:

  1. Cfookie doesnt seem to work when inside an archive. We get a weird SameSite-attribute java error. I fixed by using cookie.[var] but curious if this is a known issue
  2. Seems like scopes in memory session is running out of control. Is this total scopes saved not actual ones in memory? I store some user variables in session scope and clear on log out/login. Is this bad practice?

    thanks,
    karl

can you elaborate? (please always state which Lucee version you’re using)

Any Information on what i am seeing on session scoped variables? I can not reproduce the cookie issue on our test server so just going to drop that for now.

I am in the process of installing fusion reactor, but am experiencing some memory leaks that lead to CPU spike, that lead to server crashing. Could It be session variables not expiring? Railo → lucee was almost too easy and now after almost decade on Railo all those little hacks are coming back to haunt me.

Thanks,

Thanks

Hmmmm, SameSite support was added after 5.3.5.92, on which server version was the archive produced?

I’d suggest using the latest stable, i.e 5.3.7.47 before trying debug problems (which might have already been fixed)

Also, update your java the early 11s had their own problems

Thanks for the help again. Updated lucee and JRE. Got fusion reactor running and noticed tons of waiting threads on scheduled tasks. Removed the scheduled tasks and CPU and memory down to nothing(as they should be)

Any ideas as to what in scheduled tasks might be causing the issue?

I notice about half of them have the port set to -1?

port=“-1”

there are about 200 legacy scheduled task before we created our own task dispatcher. Converting then right now would be tough.

Also when we manually recreate a couple unique attribute is showing in xml, which is not in the orginal file

Something to do with calendar? Going write my own parser to rip thropw old xml and make new via cfschedule

sun.util.calendar.ZoneInfo.getTransitionIndex(ZoneInfo.java:335)
sun.util.calendar.ZoneInfo.getOffsets(ZoneInfo.java:250)
sun.util.calendar.ZoneInfo.getOffsets(ZoneInfo.java:227)
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2337)
java.util.GregorianCalendar.computeFields(GregorianCalendar.java:2309)
java.util.Calendar.setTimeInMillis(Calendar.java:1834)
java.util.GregorianCalendar.add(GregorianCalendar.java:1077)
lucee.runtime.schedule.ScheduledTaskThread.calculateNextExecution(ScheduledTaskThread.java:298)
lucee.runtime.schedule.ScheduledTaskThread._run(ScheduledTaskThread.java:166)
lucee.runtime.schedule.ScheduledTaskThread.run(ScheduledTaskThread.java:126)

So dumping data and cfscheduling didnt work. I binnary searched out the offenders there were three of them. That was a horrible experience:

task autoDelete=“false” hidden=“false” interval=“weekly” name=“company_67_group_Reports” paused=“false” port=“443” proxyHost=“” proxyPassword=“” proxyPort=“0” proxyUser=“” publish=“false” readonly=“false” resolveUrl=“false” startDate=“{d ‘2017-06-25’}” startTime=“{t ‘02:00:00’}” timeout=“600000” url=“http://localhost:443/scheduled_jobs/email_group.cfm?groupid=79&companyid=67”/>

task autoDelete=“false” hidden=“false” interval=“daily” name=“report_company_110_Daily_3043” paused=“true” port=“-1” proxyHost=“” proxyPassword=“” proxyPort=“0” proxyUser=“” publish=“false” readonly=“false” resolveUrl=“false” startDate=“{d ‘2019-07-14’}” startTime=“{t ‘02:00:00’}” timeout=“1250000” url=“http://localhost/scheduled_jobs/run_report.cfm?companyID=110&reportID=344”/>

task autoDelete=“false” hidden=“false” interval=“weekly” name=“report_company_110_Weekly_9989” paused=“true” port=“-1” proxyHost=“” proxyPassword=“” proxyPort=“0” proxyUser=“” publish=“false” readonly=“false” resolveUrl=“false” startDate=“{d ‘2019-07-14’}” startTime=“{t ‘02:00:00’}” timeout=“1250000” url=“http://localhost/scheduled_jobs/run_report.cfm?companyID=110&reportID=480”/>

Why these three? 2:00 am on DST or something dumb?? If it has to do with timezones or DST Im moving to china.

Hang on, this is 5.3.7.47 or the 5.3.8.139-RC. There was as DST bug [LDEV-1724] - Lucee fixed in 5.3.8, but the fix caused another issue

If it’s the RC you’re hitting this regression [LDEV-3214] - Lucee

can you comment on the issue with your problematic tasks (but only if it’s with the RC)?

Resolved the session scope runaway variables. It does seem to be a counter FWIW. We were reloading session scopes on one client continuously, even though we cleared session the counter kept going up.

So i guess the unresolved question is those scheduled tasks. When migrating to lucee on other servers is there a faster way to trace CPU sampler in fusion reactor back to the scheduled task?

my performance analyzer admin plugin lists all the thread states