go to post Norman W. Freeman · Feb 1 Thanks. I tried it and it works great most the time. However, I got a few cases where the IsUpToDate() returns 0 while the class does not show any "+" sign in Studio. I tried different values for "type" parameter but it does not help. The error reported is as such : ERROR: ^oddCOM(cls,timechanged) does not exist I checked and indeed there is no TimeChanged or TimeCreated in the class compiled global. Seems Studio is happy with that.
go to post Norman W. Freeman · Dec 28, 2023 Thanks for the code. The pound symbol is indeed the entry U+00A3 in the Unicode table, but it's always encoded as 0xc2 0xa3 in UTF-8. See this page. In UTF-8, anything above U+007F will be encoded with 2 bytes. When you see \xc2 inside CSP gateway logs, you have now clue if it was originally 0xc2 or if it was already \xc2 (0x5c 0x78 0x63 0x32 in hexa) because there is no escaping made. Apache will instead double the backslash (\\xc2) so you know it was originally \xc2 and not 0xc2.
go to post Norman W. Freeman · Dec 20, 2023 I would like to get back to record the HTTPS requests sent to a server in their RAW format (which is exactly what "V9r" is doing. There is probably other ways (eg: using packet dumper or apache module) but this is the only working one I have found so far. The other methods have also their own disadvantages and quirks.
go to post Norman W. Freeman · Oct 30, 2023 Thanks Dimitry for clarifications. I did not know about $this syntax. This is indeed explained here.
go to post Norman W. Freeman · Oct 30, 2023 This will call the child/extended method and the superclass method, I want to bypass that and call base/super method directly.
go to post Norman W. Freeman · Oct 10, 2023 Can you provide a link to the documentation (or an example) that show how to use the classes you mention in Ensemble ? EDIT : is this what you are talking about when referencing "pool sizes" : https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ECONFIG_PoolSize
go to post Norman W. Freeman · Aug 31, 2023 I have enabled the logs and here is what I got (several times) : Initialization Apache Worker Process Initialization: PID=11330; Configuration=0x7fe92f816000; Establish a new connection Connection-No=156:0; Gateway PID=11330; InterSystems IRIS Server=IRIS (xxx.xxx.xxx.xxx:56773); InterSystems IRIS PID=31932 (...) Close Down Apache Worker Process Close Down: PID=11330; Configuration=0x7fe92f816000; This is on the non working server. The other one does not have such events, unless Apache is restarted (since there is no need to recreate new connections every time). mpm module: MaxConnectionsPerChild (also named MaxRequestsPerChild in older versions) is set to 0. According to Apache docs, this means the process should never expire (but it does as seen in the logs). This is also the recommended setting from the InterSystems page you mentioned. MaxSpareThreads is not set on both servers (unlike what is recommended by InterSystems). Intersystems page also recommend to use a "NSD based Gateway configuration" if needed. That's not what I use. Both servers load the /opt/webgateway/bin/CSPa24.so module, not the mod_csp24.so one. Also: I have notified a difference in Apache version. The non working server use an older one. I will try upgrading it.
go to post Norman W. Freeman · Aug 31, 2023 I have checked the specific web application that I used during testing and they are exactly the same on both side. I don't think it's related to licensing or sessions. The behavior described in the OP occurs even for requests that does not require a license or session.
go to post Norman W. Freeman · Aug 26, 2023 Thanks for you help. I took a look at Apache and I couldn't find anything wrong with it. Here is a summary of it : LoadModule csp_module_sa /opt/webgateway/bin/CSPa24.so CSPFileTypes csp cls zen cxw CSPModulePath /opt/webgateway/bin/ CSPConfigPath "/opt/webgateway/bin/" <Location "/csp/bin/Systems/"> SetHandler cspsys-handler-sa </Location> <Location "/csp/bin/RunTime/"> SetHandler csp-handler-sa </Location> Alias /iris/csp/ "/opt/webgateway/iris/csp/" Alias /csp/ "/opt/webgateway/iris/csp/" <Directory "/opt/webgateway/iris/csp"> CSPFileTypes csp cls zen cxw AllowOverride None Options MultiViews FollowSymLinks ExecCGI Require all granted <FilesMatch ".(log|ini|pid|exe)$"> Require all denied </FilesMatch> </Directory> <Directory "/opt/webgateway/bin/"> AllowOverride None Options None Require all granted <FilesMatch ".(log|ini|pid|exe)$"> Require all denied </FilesMatch> </Directory> <Location "/csp/"> Require all granted </Location> <Location "/csp/bin/Systems/"> SetHandler cspsys-handler-sa Require ip xxx.xxx.xxx.xxx </Location> <Location "/csp/bin/RunTime/"> SetHandler csp-handler-sa Require ip xxx.xxx.xxx.xxx </Location> <LocationMatch "/csp/(sys|user|samples|docbook|documatic)/"> Require all denied </LocationMatch>
go to post Norman W. Freeman · Aug 25, 2023 Thanks a lot. I have been trying to make this work until I saw your message. Official documentation still mention ^%ISCLOG (non sense)
go to post Norman W. Freeman · Aug 12, 2023 For debugging reasons : I wanted to dump the stack to a global, to find out from where some piece of code was called.
go to post Norman W. Freeman · Aug 6, 2023 Here is the solution I end up using. This is based on a solution suggested by Julius Kavay : set cmd="netstat -anp TCP" set oldIO = $io open cmd:"QR":10 use cmd // in case, $zeof is not set per default // set old=$system.Process.SetZEOF(1) for { read line //timeout alternative, no need of $zeof: read line:1 quit:$zeof ... //do something with line } close cmd use:oldIO]"" oldIO // d $system.Process.SetZEOF(old) You can find more info about it here. As an alternative, it's also possible to use pipes ($zeof must be used as well): set dev="|CPIPE|"_$job open dev:cmd:10 use dev ... close dev
go to post Norman W. Freeman · Aug 5, 2023 I had same #2071 error because I set an incorrect value in "InterSystems IRIS Instance Name" What need to be set is simply "IRIS" (I put SERVERNAME/IRIS instead) Restarting ISCAgent service (on Windows) might also help.
go to post Norman W. Freeman · Aug 4, 2023 Thanks. Do you have any reference to the official documentation for this @something@ syntax ? EDIT : found it. It's called Subscript Indirection.
go to post Norman W. Freeman · Jul 27, 2023 I have tried that that command but all I got in message.log is this : [Generic.Event] $ZF(-100) cmd=netstat -ano -p tcp [Generic.Event] $ZF(-100) ret=0 Is there something special to enable (like some flags that prevent full dump) ?The documentation does not say much about it.
go to post Norman W. Freeman · Jul 27, 2023 Hi. AFAIK this only show the current active output device (eg: the last one set by USE command). There can be many underlaying connections under that process.
go to post Norman W. Freeman · Jul 10, 2023 Here is what I end up using : set file = ##class(%File).%New("journal.txt") set sc = file.Open("NW") set path = ##class(%SYS.Journal.System).GetLastFileName() set journal = ##class(%SYS.Journal.File).%OpenId(path) set rec = journal.FirstRecord while $iso(rec) { if (rec.TypeName = "SET") || (rec.TypeName = "KILL") { do file.WriteLine(rec.Address_$c(9)_rec.TimeStamp_$c(9)_rec.ProcessID_$c(9)_rec.TypeName_$c(9)_rec.InTransaction_$c(9)_rec.GlobalNode_$c(9)_rec.DatabaseName) } set rec = rec.Next } set journal = "" do file.Close()
go to post Norman W. Freeman · Jul 10, 2023 You are probably talking about this : https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic.... I didn't know it existed. I will take a look. EDIT: busted by Chad
go to post Norman W. Freeman · Jul 6, 2023 Locks are part of gmheap but you could allocate them in advance locksiz. So what is specified in locksiz is already "reserved" from gmheap ? (eg: you cannot run out of memory for locks because of excessive gmheap usage).