by the way great album : The Police - Ghost in the Machine
- Log in to post comments
by the way great album : The Police - Ghost in the Machine
Hi Hansel,
Temp should only grow because of use of temporary globals. (^IRIS.temp, ^mtemp, or any other global explicitly mapped to IRISTEMP)
In my experience, sudden growth of temp is mostly due to an SQL query that is doing a join or order of non-indexed columns.
When you restart Iris, you could delete the iristemp (it will recreate it), you can also set a param to truncate it automatically at startup:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
You could redirect the output of the python script to a file as described in
https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?…
or https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=B…
and read the file in Cache.
Or better to create a rest call in python and call it in Caché
I don't see any performance disavantages in using SOAP or REST to call classmethods of other IRIS instances compared to ECP.
And SOAP/REST is available in all IRIS license types, in contrast with ECP.
Could be a xDBC query that is using too much temp space
When i use %SQL.Statement, and I pass sql to the %Prepare method as an array, it will start to fail around 11,400 characters
The maximum length of a column is defined by the MAXLEN parameter in the class definition.
The maximum string length is 32,767 and 3,641,144 if long strings are enabled.
If you use Streams as data type, you don't have a limit and can use Substring(column, from, maxlen) in SQL
Look at the file CodeSnippets.txt which is located in the Documents\InterSystems directory on your windows pc where Studio is installed
What error are you getting ? Can you call the function in terminal ?
SQL queries via xDBC are cached, you can remove the cached queries in the managment portal, Explorer -> SQL :
.png)
You should not always rely that all data is in cache and processing of the data can be done before a timeout occurs. (data will grow, more users can use the system, ...)
For REST queries that have the risk of running too long, you can do as follows :
- the api responds immediately with a queryId (some sequential number),
- the query continues to run in the background, and the response of the query will be stored in some table/global/... with the queryId as the key
- a separate api call is used by the client (with the queryId) to get the response (or a 'not ready' status when the query is still running).
It is a little more work on the client to call once to launch the query, and a second.. time to get the results, but you are safe when your systems grows with data or users
Hi Robert,
Handy to know i can still use this whenever the internet goes down, and i need to dial into my customers with a 300 BAUD modem !
Danny (fellow dinosaur)
Hi Anthony,
Look at the doc for the property EntityBody, you can do something like :
property EntityBody as
When an Entity-Body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding. These define a two-layer, ordered encoding model.
This is a stream so to insert into this stream use:
Do oref.EntityBody.Write("Data into stream")
Use %SQL.Statement for dynamic sql, do not use %ResultSet anymore (it is slower).
Can you include the class definition so we can take a look ?
Hi Yone,
Following link explains how to do the same in 2016.1 :
https://cedocs.intersystems.com/ens20161/csp/docbook/DocBook.UI.Page.cls?KEY=GJSON_tojson
But you risk writing code which will be incompatible with later versions as much of the json syntax of pre 2016.2 is not valid anymore.
Hi Yone,
what version are you using ? From Caché/Ensemble 2016.2 you could create your json directly like :
Hi Raj,
I use different IDE's and combinations :
- Caché Studio without any extensions for development where i am self-employed and no other developers are involved
- Caché Studio with Serenji source control from Gerorge James for a particular customer where i am one of the developers
- Visual Studio Code with the vscode-objectscript extention from Dmitry Maslennikov for another customer where i am one of the developers.
I like Caché Studio since I use it from day 1, because it is build-in so no need to configure anything. I use the 'projects' feature a lot, and export my projects regularly as a sort of 'light' source control. (I even edit my html and js files in Studio, even when they contain no COS code at all.)
But when developing in teams a good build-in source control is essential, so that's why i also use the other options. I am still learning Visual Studio Code but it seems the way for the future.
Hi Youness,
There is no direct way from within Caché to modify excel sheets.
I use .csv files, or generate a .txt file, and call an excel file that runs a macro to read the data, and set all the stuff using VB code in the macro.
You can look at this article that talks about different options :
https://community.intersystems.com/post/use-cache-write-excel-files
Hi Youness,
how are you exporting the data to excel : as a .csv file ?
I am not sure if this is your problem, but when exporting data (numbers) to excel, you need to be careful on the decimal character you are using : if i export numbers with a decimal point, and my locale is set on comma as a decimal , the numbers are treated as strings, and no validation works.
Hi Evgeny,
the info is at least unreliable, so i vote to ask the author to delete this information from the article. There is already too much fake news on the internet, lets make this little part of the internet as reliable and accurate as possible !
works also with multiple characters :
It all depends from which backup and journal files you start the recovery.
You need to start from a backup & all journal files from before your event that killed the data (and stop the restore just before that event, which i assume is 11/14/2019 15:18:56). What happened on this time : did you kill some data or remove the class ?
It seems that the restore did not fully restored the class definition : can you go into studio and recompile the class ?
In the class definition, you will find the actual global names where the data is stored (by default it will be ^User.MemberD and ^User.MemberI (and possibly ^User.MemberS). Do you have these globals after the restore ?
There is no general answer if it is possible : it depends on the application : I have done conversions in a few hours, but had also conversions that took a lot longer or were impossible without heavy rewrite of code.
Depends on :
- use of OS-dependencies (VMS/VAX) like working with files/devices or print operations
- use of 'non-standard' Mumps syntax, or relying on specific formats of special variables
- use of DSM-11 tools (like DASL) or OS tools
- available source code
- ...
Hi Everardo,
I have seen the error, but not in testing ensemble messages :
variables preceded by _ (underscore) are only to be used in Caché Direct (VISM) programs.
Are you running any code that uses too much underscores ?
For example :
USER>set var1=1 USER>set var2="a"_var1 USER>set var2="a"__var1 ;two underscores <FUNCTION>GetProp+2^%CDCalBk USER 3e1>
Any special mappings in that namespace? Size ?
Try to export classes and routines from that namespace and import them in a new namespace, is it still slow in the new namespace?
Hi Gunwant,
can you show us the postman screenshot, and your resthandler class.
It will be much easier for the community to solve your problem with this info, than having to guess,
Friendly Regards
Caché IS a virus : once you get it, you can never get rid of it ![]()
I prefer option 3 as the other options only makes your code more unreadable.
We could use <GLOBAL>^MyGlobal</GLOBAL> in the documentation, and write some script to generate a summary page of all classes that point to this global...
Are you pointing the filestream to the correct file : is there any data in the filestream (you are using \Temp\GaganTest : it will use the same drive as the one where your database is located, also no extension is mentioned)
You can set a timeout (Set ftp.Timeout = 100) if the ftp server times out when uploading big files.
The file size will not effect your cache.dat size.
Hi Bava,
Try giving the user the Role %EnsRole_Monitor
More info on all the Ensemble Roles you could give the user are found here :
https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EGMG_security_roles