Picture of Daniel 450
Registered 14 years 288 days
Daniel 450 Monday, 6 June 2022, 02:53 PM
file access js runtime serversice
Hello,

is there a posibility to access files with the serverside js?
1. Access Files from Files App
2. Write and Access own files in an App Container
3. Files from the Linux OS filesystem
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Wednesday, 15 June 2022, 12:41 PM
Re: file access js runtime serversice
Hello Daniel,

> 1. Access Files from Files App
The Files App API is not documented yet. I will clarify the current status and give you feedback.

> 2. Write and Access own files in an App Container
This is not possible at the moment. We have no plans to extend it.

> 3. Files from the Linux OS filesystem
Also not possible.

For JavaScript Runtime we have a possibility to store files via DbFiles Library:
https://sdk.innovaphone.com/common/interface/dbfiles.htm

The library can be accessed from the JavaScript Runtime after configuration in config.json:
https://sdk.innovaphone.com/13r2/doc/appgeneric.htm#config-dbfiles

The file listing and file access is available via the DbFileList message and HTTP GET and POST:
https://sdk.innovaphone.com/13r2/doc/appgeneric.htm#client-DbFilesList

Best Regards
Andreas Fink
Picture of Daniel 450
Registered 14 years 288 days
Daniel 450 Friday, 17 June 2022, 08:57 AM
Re: file access js runtime serversice
Hello Andreas,

thank you for your answers, we know but we didn´t try the files db storing.
But for what we want to realise i think thats not the right solution.
So we hope that 1. or/and 2. will be possible in the near future.
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Friday, 17 June 2022, 01:39 PM
Re: file access js runtime serversice
Hello Daniel,

it will be not a big difference between DbFiles and Files App API.

I'm wondering what the use case is exactly? Do you need file system access? It will be not possible with the Files App too.

Best Regards
Andreas Fink
Picture of Daniel 450
Registered 14 years 288 days
Daniel 450 Monday, 8 August 2022, 12:23 AM
Re: file access js runtime serversice
Hello Andreas,

yes we need min. Files App file access. For example to read a folder of the stored files to set then the url to that file for example in an PBX WQ object.
Also would it be very nice to store files with the Files App Api, because we didn´t want to do that with a DbFiles and Network API workaround.

If you are fast to make it possbile, then we are fast to release a new app ;)
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 31 January 2023, 04:57 PM in response to Andreas Fink (innovaphone)
Re: file access js runtime serversice
Hello Andreas,

i am in the process of writing user uploaded files to the database. Before I try the solution with the dbfiles library, I first try to work only with the postgresql data type bytea and I was successful (up to a certain point). Two general problems came up:

1. If the user selects a file, greater than X, the app frontend crashes
-> What is the maximum size of a message that can be send from frontend to backend? Is it possible to increase the message size? Do i need to process multiple messages (chunks) to send a large file to the backend?

2. While sending for example a 7zip file to the backend (after reading the file in frontend with FileReader), i recognized that the frontend sends the message as expected but at the backend i receive not the same message, the message is choppy. Trying to encode the message in frontend with "window.atob(fileContent)" results in an error "String contains an invalid character".
-> Do you know the correct way to send messages with special characters? Is there an performant and easy way to encode such a message before sending it to the backend?

Next i will try https://sdk.innovaphone.com/13r2/doc/appgeneric.htm#client-DbFilesList . Since the client can send files directly to DBFiles, the above problems should not occur. Is it possible to add here https://sdk.innovaphone.com/13r2/doc/appgeneric.htm#client-http an example how to "add" files with the post message? Is there a file size limit or a size for files that you think should not be exceeded using the DBFiles library (due to performance issues etc.)?


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Tuesday, 31 January 2023, 07:45 PM
Re: file access js runtime serversice
Hello Mladen,

please find attached an example usage of the dbfiles instance.

In the file config.json following entities are defined:
  • a DB table for folder storage
  • a corresponding statement "insert-folder"
  • a dbfiles instance configuration (dbfiles requires a DB table for folder storage)
In the file innovaphone-jsdbfilesexample.js the usage of the defined entities is done:
  • Creating a folder entry in the DB by calling the predfined statement: app.sendSrc({ mt: "SqlInsert", statement: "insert-folder", args: { name: "myFolder" } }, folder_added);
  • A list of the existing files in the folder is retrieved by using folder id returned in the previous step: app.sendSrc({ mt: "DbFilesList", name: "myfiles", folder: id }, list_folder_result);
  • A file is uploaded by using POST via Fetch API in the function post_file(file)

Regarding the questions - I need more context here (having exact steps what are you doing, would be great):
> 1. If the user selects a file, greater than X, the app frontend crashes

What do you mean by "frontend"? Any more information on crash?

> the message is choppy.

Any example? How do you send the data?

Best Regards
Andreas Fink
jsdbfilesexample.zip
Picture of mitop
Registered 4 years 40 days
mitop Wednesday, 1 February 2023, 02:41 PM
Re: file access js runtime serversice
Hello Andreas,

thank you very much for the example. I am off a few days, will be back at Monday and try the solution.
Last questions regarding the dbfiles api: If I saw/interpreted it correctly, then any client/user can add/remove folders and files? These files are always and for all (also for the outside world) available? In other words, can dbfiles also be used to implement some kind of access restriction for retrieving/watching the files?


Answering your questions

>Regarding the questions - I need more context here (having exact steps what are you doing, would be great):
>> 1. If the user selects a file, greater than X, the app frontend crashes

>What do you mean by "frontend"? Any more information on crash?

-> By frontend i mean the part of code running inside the browser/in front of the users. Is there another definition of frontend? Maybe I should write a few more sentences here. For the first approach with the postgresql bytea datatype, I added a FileSelectionDialog in the frontend so that the user can select a file from his local storage. After selecting the file, i use the FileReader javascript class to read the content of the file (all variants tried). Afterthat i do a "app.send({mt: "SaveFile", filecontent: filercontentread})" and send the data to the backend/service of the app in order to write the file to the db. The first tests I made with a standard "lorem ipsum" file (https://loremipsum.io). Reading the file, sending the file, storing the file, requesting the file and sending back to user, works as expected. My second test was, to blow up this "lorem ipsum" file step by step, to see if i get any trouble processing/storing larger files. In this test I find that the frontend crashes at a file size of 1MB (I have not tested if there are problems with smaller file sizes/message sizes too). The crash is strange, what I have noticed so far is that the app frontend calls the "app_connected" function again, so the app reconnects (I did my tests from the browser, not from myApss). The message that was apparently sent before does not arrive in the backend. Quickly I have not seen any strange output on the console, On the fly I haven't seen any strange output on the console, but can check again.


>> the message is choppy.

>Any example? How do you send the data?

As mentioned before, the data is send with "app.send({mt: "SaveFile", filecontent: filercontentread})". The files i used were a 7zipped "lorem ipsum" file and a 7zipped certificate file (small size so that i do not run in the error above). In browser console i can see that the message from user/frontend is send out correctly. At backend/service side i do only receive a few characters from the beginning of the "filecontent", seems that during transport or while processing the message on service side the message gets corrupted. My current guess is that it is because of the special characters inside "filecontent", because it worked with the "normal" file contents. As a last test (a few minutes ago) i tried to encode (base64, btoa(...)) the "filecontent" before sending the message to service side, and this solution works. I can store the "filecontent" to bytea database type and do get the same content back on frontend/user side after decoding. Now i am struggeling with the FileWrite operation on frontend side to write the 7zip file back to local storage, but somehow I will get it running.


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Wednesday, 1 February 2023, 07:48 PM
Re: file access js runtime serversice
Hello Mladen,

I'm still not sure if I understand it correctly - your frontend crashes, means your browser crashes?

What is exactly is SaveFile Message Type? A JSON API provided by your App Service?

It should be not possible to send more that 65353 bytes in one JSON message over the AppWebsocket. The buffer on the App Service is limited by this length.

Probably, you will need to implement chunked transfer - cut the file in multiple chunks and sent them one by one to the App Service.

Is your App Service based on C++ or JavaScript? If so, the Webserver Library supports incoming WebSocket connections with binary data, so no encoding is required prior sending the data via WebSocket.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Monday, 6 February 2023, 05:00 PM
Re: file access js runtime serversice
Hello Andreas,

the browser does not crash, only the app itself reconnects. The problem should be the size of the message, because with smaller sizes everything is fine. Thank you for the info of max. JSON message size. Using this message size in combination with the bytea data type will only work for very small file sizes.

The app is developed on JavaScript. Using the WebSocket connection with binary data from the WebServer library can be a solution for our purpose. If implementing a chuncked transfer, i would need to implement a chucked compatible WebServer and a chucked compatible database adding/reading logic. Or i receive all the data at once, and risk a memory overload (or I limit the size of the uploadable files). I'll make those decisions later.

Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Wednesday, 1 February 2023, 08:20 PM in response to mitop
Re: file access js runtime serversice
Hello Malden,

> Last questions regarding the dbfiles api: If I saw/interpreted it correctly,
> then any client/user can add/remove folders and files?
> These files are always and for all (also for the outside world) available?
> In other words, can dbfiles also be used to implement some kind of
> access restriction for retrieving/watching the files?

You will need a session key, which is part of a file path, to be able to download a file.

The access can be restricted by different folders for different users, so if you do not know the name of the folder, you can not store the file.

There is no other access restriction possible at the moment, in case you are using the dbfiles provided by JavaScript Runtime.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Monday, 6 February 2023, 05:01 PM
Re: file access js runtime serversice
Hello Andreas,

i have implemented the DBFiles api and i was able to add files. Working with the files api, i encountered a few problems (maybe bugs):

1. When i delete a file with the DBFiles Api, only the entry inside the "files" database table is deleted, but not the data of that file inside "files_data"
-> Do i need to delete it by my own??? Or is this an intentional behavior (delete the reference but keep the data in database)? Doesn't that clutter up the database?

2. Trying to access the file via browser, using the path with session key, downloads the file, but the name of the file is corrupted (the name consists of hyroglyphs only + the extension) and the length of the file is 0 bytes. I was not able to download/access a valid file from browser (although the database entries all look good, i can see that the correct file name was written to the db). Can you think of a reason why this behavior occurs?

3. From the 10th file I add, I get wrong information returned from DBFilesList, please see the 9th and 10th output of DBFilesListResult:
"
: [test.txt], [/shareinno/myfiles/22/test.txt?key=39fb6cbabc36555cc5d1ed830b1551168e3acb30676f5e08c8627f15e7038922] mediarunway-shareinno.js:79:38
: [test.txt], [/shareinno/myfiles/24/test.txt?key=39fb6cbabc36555cc5d1ed83{"src":"src1","mt":"DbFilesListResult","]
"
-> The path/message returned is corrupted

Adding a 11th entry then leads to an error (inside browser trying to show the DBFilesListResult)
"
Uncaught SyntaxError: JSON.parse: unexpected character at line 1 column 1476 of the JSON data
onmessage https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:83
connect https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:255
Connection https://dev-apps.mr-uc.de/shareinno/13C258/web1/appwebsocket/innovaphone.appwebsocket.Connection.js:428
"

-> What means, i can only handle 9 files per folder. Or is this an intentional behavior???

4. Am i right, that the session key of the stored files path changes every time i close and reopen the app? That means if i send the path/link to somebody for download, and close/reopen my app instance, the send link becomes useless? This would mean, i need my own WebServer logic and internal name/path handling to make the access of the file permanent (or to restrict it).

Tomorrow I will check a few things again, not that I missed something.

Best regards
Mladen Topic
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 21 February 2023, 03:38 PM
Re: file access js runtime serversice
Hello Andreas,

just wanted to ask briefly and without obligation, if there are any updates on this topic here? Can I provide any more information?


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Friday, 24 February 2023, 12:34 PM
Re: file access js runtime serversice
Hello Mladen,

I'm sorry for the delay - we noticed a general problem in the Files API implementation, that must be fixed first. I hope, we can deliver a solution next week, so i can answer all your questions.

For the time being just a short status regarding your questions:

1) Related entries should be deleted too, cause ON DELETE CASCADE is used while creating the table files_data:

"file", "BIGINT REFERENCES files(id) ON DELETE CASCADE"

You can check all foreign key relations in the database with this query:
https://soft-builder.com/how-to-list-all-foreign-keys-in-postgresql-database/

So cluttering up the database should not happen, but this happens, it must be a bug.

2) An example (log, trace ) would be great.

3) This is a bug. Here are we working on a change: the file infos will be delivered in separate messages.

4) Yes the key is session related, the link is only valid for the myApps user. You will need to implement an own service to deliver the Files via permalink.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Thursday, 2 March 2023, 06:37 PM
Re: file access js runtime serversice
Hello Andreas,

i will answer your request ( "2) An example (log, trace ) would be great." ) next week, have made changes to the code, so I can't repeat it directly. Just wanted to let you know.


Best regards
Mladen Topic
Picture of mitop
Registered 4 years 40 days
mitop Monday, 3 April 2023, 11:21 PM in response to Andreas Fink (innovaphone)
Re: file access js runtime serversice
Hello Andreas,

the text that i screenshoted and that you will find attached here, contains my answer for the javascript DbFiles interface, that was blocked for security reasons. I tried to add the image here directly, but the image seems to be too big and i received an error from the wiki db.

Please see the attached image for answer.


Best regards
Mladen Topic
js_dbfiles_interface.PNG

Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Thursday, 27 April 2023, 12:19 PM
Re: file access js runtime serversice
Hello Mladen,

thank you for a very detailed descriptions.

To the questions:
1) It is a local logging problem of the postgresql client, that prints additional characters at the end of the statement. You can assume that the id in this case was 95 and not 951. We have fixed it in the latest SDK release.

2) Usually the download happens form the App Client, where the URL delivered by DbFilesListResult can be used directly from the location of the app.

For example:

The URL of the app is wss://172.31.29.123/jsdbfilesexample/13C322

(13C322 is the build number, and can be removed/ignored).

The result of the DbFilesList request:
{
"files": [
{
"id": 99,
"name": "report_123.pdf",
"url": "myfiles/99/report_0123.pdf?key=4b6fa98bf6493c0b429295c6aaf0bfae4f280bbd6c64e64c37ec949df99ea499"
},
{
"id": 100,
"name": "report_234.pdf",
"url": "myfiles/100/report_234.pdf?key=4b6fa98bf6493c0b429295c6aaf0bfae4f280bbd6c64e64c37ec949df99ea499"
}
],
"more": 100,
"mt": "DbFilesListResult",
"src": "src1"
}


The resulting URL for the file, from the client point of view, would be:
https://172.31.29.123/jsdbfilesexample/13C322/myfiles/99/report_123.pdf?key=4b6fa98bf6493c0b429295c6aaf0bfae4f280bbd6c64e64c37ec949df99ea499

3) We have changed the default limit to 50 in latest minute, and forgot to update the documentation. You can set the "limit" property to something smaller, like 5, to see, how it works with smaller amount of files.

Best Regards
Andreas Fink

Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Thursday, 27 April 2023, 12:45 PM
Re: file access js runtime serversice
Additional questions to the question 2) :

Are you trying to access the file from the JavaScript App Service?

If so, why not to use Database Library for the JavaScript App Service to access the files directly?

If not, i see no need for using the WebServer.onurlchanged to figure out the path of the App Service instance, since it is already known in the App Client and the URLs of the files are already correct, relatively to the App URL.
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 2 May 2023, 06:33 PM
Re: file access js runtime serversice
... what I want to achieve is to offer the files permanently as download (with load control in the backend) and not only when the user's session remains open (the downloads seem to be accessible also for not logged in users from the outside world as long as the session is open). For this, the service (backend) should create a separate URI for each file offered for download, and for this I need the relative URL of the app on service side. Should have mentioned this point so that no misunderstandings occur.
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Wednesday, 3 May 2023, 12:21 PM
Re: file access js runtime serversice
OK, this is an additional functionality, out of scope of the DbFiles functionality in the generic app. For this functionality you will need:
  • an implementation of file delivery via Webserver Library (read file chunks from DB, deliver via Webserver)
  • optional additional access control via database table with credentials/keys
I can try to make an example, this week.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 2 May 2023, 06:22 PM in response to Andreas Fink (innovaphone)
Re: file access js runtime serversice
Hello Andreas,

after some testing i can provide more information.

Brief preliminary remark: Visual Studio has been updated to the latest version, the latest SDK for development has been installed, the SDK version of the app has been updated, the pbx of the development system has been updated to the 13r3 sr4 version of the SDK, the app platform is up to date (110027) and all apps (web servers, etc.) have been updated.

To the questions:
1) Not sure what is wrong, deleting the file via DbFiles (?dbfiles=<dbfiles-name>&folder=<folder>&name=<name>&del=<del-id>&key=<key>) does not work. Maybee something is wrong with the config file of the app. Please see the attached file with screenshots of the dbfiles config part of the app, the database view before deleting a file, the file delete repsonse and the database view after calling the delete command. The files table does not contain the the filename anymore, but the files_data table still contains the id of the deleted file. Can't see why it goes wrong or if I'm missing something when executing the Delete command. What I don't understand is why the file name disappears from the table, but the associated data does not.

2) The answer will be in the respective post from you

3) I set the "limit" to 5 and was able to use the "more" function successfully. It would be good if the documentation is adjusted so that the correct limit is known. It would also be good to add the "more" flag when using DbFilesList and maybe a small example how to use it with the sendSrcMore.


Best regards,
Mladen
dbfiles_delete.png

Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Thursday, 11 May 2023, 07:32 PM
Re: file access js runtime serversice
Follow-up after remote debugging:
The table had missing foreign-key constraints:
"files_data_file_fkey" FOREIGN KEY (file) REFERENCES files(id) ON DELETE CASCADE

Setting up a new app instance has fixed the problem.
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 4 April 2023, 10:00 AM in response to Andreas Fink (innovaphone)
Re: file access js runtime serversice
Good morning,

regarding the second topic (hyroglyphs in file name and empty file while downloading) I was just able to remove my bug and can now provide the log where one can see that the Webserver or DbFiles interface returns something wrong (example with 3 files - file1.txt, file2.txt, file3.txt):
"
04-04 07:44:17.158 shareinno@test-pbx.de WebserverWebsocketHandler(011b3cb0,0119f8f0,41369)::Recv buffer:0x00000000 len:0
04-04 07:44:17.158 shareinno@test-pbx.de WebserverMessage(connection id: 41369)::WebsocketSend: Sending Websocket message WS_WEBSOCKET_RECV (fragmented: false, text: false, data size: 0)
04-04 07:44:25.184 shareinno@test-pbx.de WebserverPlugin(0x1125920,0x1124830)::SocketRecvResult: Received message WSM_GET_REQUEST (data size: 774)
04-04 07:44:25.184 shareinno@test-pbx.de IWebserverGet(connection id: 41630)::IWebserverGet(): resourceName: '/myfiles/162/file1.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f', reqPathForRequest: ''
04-04 07:44:25.184 Generic::WebserverPluginHttpListenResult resourceName=/myfiles/162/file1.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f registeredPathForRequest= httpfilesBuild=13C468
04-04 07:44:25.184 Generic::WebserverPluginHttpListenResult find dbfiles instance=myfiles
04-04 07:44:25.184 GenericGet::GenericGet
04-04 07:44:25.184 GenericGet::WebserverGetRequestAcceptComplete
04-04 07:44:25.184 shareinno@test-pbx.de WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 41630)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr'
04-04 07:44:25.184 shareinno@test-pbx.de WebserverGetHandler(connection id: 41630)::ForceDownloadResponse() fileName: '^�l���e1.txt'
04-04 07:44:25.184 shareinno@test-pbx.de DbFiles(0119a910)::Get user:011b8048 id:0 offset:0
04-04 07:44:25.184 shareinno@test-pbx.de DbFilesGet(011be350)::DbFilesGet dbfiles:0119a910 id:0
04-04 07:44:25.184 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,01123e68)::ExecSQL(PS) user:011be368 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1
04-04 07:44:25.185 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,011be368)::DatabaseExecSQLResult dataset: 011b8880
04-04 07:44:25.185 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::Read TaskComplete stopped:0
04-04 07:44:25.185 GenericGet::TaskComplete
04-04 07:44:25.185 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::~DbFilesGet
04-04 07:44:25.185 shareinno@test-pbx.de IWebserverGet(connection id: 41630)::Close()
04-04 07:44:25.185 shareinno@test-pbx.de ExtendedHeader::Encode(): Extended header encoded (cid: 41630, h-len: 69, b-size: 73)
04-04 07:44:25.185 shareinno@test-pbx.de IWebserverGet(connetion id: 41630)::Send(): Sending message WSM_SEND_META_DATA (data size: 73)
04-04 07:44:25.185 54ED9A10 - 00 00 00 45 05 00 38 43 6F 6E 74 65 6E 74 2D 44 ...E..8Content-D
04-04 07:44:25.185 54ED9A20 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac
04-04 07:44:25.185 54ED9A30 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename=
04-04 07:44:25.185 54ED9A40 - 22 5E CC 6C BC A3 E1 65 31 2E 74 78 74 22 00 12 "^.l...e1.txt"..
04-04 07:44:25.185 54ED9A50 - 00 00 0B 00 04 01 01 00 00 .........
04-04 07:44:25.185 shareinno@test-pbx.de IWebserverGet(connetion id: 41630)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0)
04-04 07:44:25.185 shareinno@test-pbx.de IWebserverGet(connection id: 41630)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0)
04-04 07:44:25.185 shareinno@test-pbx.de IWebserverGet(connection id: 41630)::~IWebserverGet()
04-04 07:44:31.292 shareinno@test-pbx.de WebserverPlugin(0x1125920,0x1124830)::SocketRecvResult: Received message WSM_GET_REQUEST (data size: 774)
04-04 07:44:31.292 shareinno@test-pbx.de IWebserverGet(connection id: 41646)::IWebserverGet(): resourceName: '/myfiles/142/file2.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f', reqPathForRequest: ''
04-04 07:44:31.292 Generic::WebserverPluginHttpListenResult resourceName=/myfiles/142/file2.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f registeredPathForRequest= httpfilesBuild=13C468
04-04 07:44:31.292 Generic::WebserverPluginHttpListenResult find dbfiles instance=myfiles
04-04 07:44:31.292 GenericGet::GenericGet
04-04 07:44:31.292 GenericGet::WebserverGetRequestAcceptComplete
04-04 07:44:31.292 shareinno@test-pbx.de WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 41646)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr'
04-04 07:44:31.292 shareinno@test-pbx.de WebserverGetHandler(connection id: 41646)::ForceDownloadResponse() fileName: '^�l���e2.txt'
04-04 07:44:31.292 shareinno@test-pbx.de DbFiles(0119a910)::Get user:011b8048 id:0 offset:0
04-04 07:44:31.292 shareinno@test-pbx.de DbFilesGet(011be350)::DbFilesGet dbfiles:0119a910 id:0
04-04 07:44:31.292 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,01123e68)::ExecSQL(PS) user:011be368 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1
04-04 07:44:31.293 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,011be368)::DatabaseExecSQLResult dataset: 011b8880
04-04 07:44:31.293 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::Read TaskComplete stopped:0
04-04 07:44:31.293 GenericGet::TaskComplete
04-04 07:44:31.293 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::~DbFilesGet
04-04 07:44:31.293 shareinno@test-pbx.de IWebserverGet(connection id: 41646)::Close()
04-04 07:44:31.293 shareinno@test-pbx.de ExtendedHeader::Encode(): Extended header encoded (cid: 41646, h-len: 69, b-size: 73)
04-04 07:44:31.293 shareinno@test-pbx.de IWebserverGet(connetion id: 41646)::Send(): Sending message WSM_SEND_META_DATA (data size: 73)
04-04 07:44:31.293 54ED9A10 - 00 00 00 45 05 00 38 43 6F 6E 74 65 6E 74 2D 44 ...E..8Content-D
04-04 07:44:31.293 54ED9A20 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac
04-04 07:44:31.293 54ED9A30 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename=
04-04 07:44:31.293 54ED9A40 - 22 5E CC 6C BC A3 E1 65 32 2E 74 78 74 22 00 12 "^.l...e2.txt"..
04-04 07:44:31.293 54ED9A50 - 00 00 0B 00 04 01 01 00 00 .........
04-04 07:44:31.293 shareinno@test-pbx.de IWebserverGet(connetion id: 41646)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0)
04-04 07:44:31.293 shareinno@test-pbx.de IWebserverGet(connection id: 41646)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0)
04-04 07:44:31.293 shareinno@test-pbx.de IWebserverGet(connection id: 41646)::~IWebserverGet()
04-04 07:44:36.824 shareinno@test-pbx.de WebserverPlugin(0x1125920,0x1124830)::SocketRecvResult: Received message WSM_GET_REQUEST (data size: 774)
04-04 07:44:36.825 shareinno@test-pbx.de IWebserverGet(connection id: 41653)::IWebserverGet(): resourceName: '/myfiles/143/file3.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f', reqPathForRequest: ''
04-04 07:44:36.825 Generic::WebserverPluginHttpListenResult resourceName=/myfiles/143/file3.txt?key=da0eadd13f8e3485dad0994eceef77ed9647b50d1bee693ed39758cf46fd799f registeredPathForRequest= httpfilesBuild=13C468
04-04 07:44:36.825 Generic::WebserverPluginHttpListenResult find dbfiles instance=myfiles
04-04 07:44:36.825 GenericGet::GenericGet
04-04 07:44:36.825 GenericGet::WebserverGetRequestAcceptComplete
04-04 07:44:36.825 shareinno@test-pbx.de WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 41653)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr'
04-04 07:44:36.825 shareinno@test-pbx.de WebserverGetHandler(connection id: 41653)::ForceDownloadResponse() fileName: '^�l���e3.txt'
04-04 07:44:36.825 shareinno@test-pbx.de DbFiles(0119a910)::Get user:011b8048 id:0 offset:0
04-04 07:44:36.825 shareinno@test-pbx.de DbFilesGet(011be350)::DbFilesGet dbfiles:0119a910 id:0
04-04 07:44:36.825 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,01123e68)::ExecSQL(PS) user:011be368 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1
04-04 07:44:36.826 shareinno@test-pbx.de PostgreSQLDatabase(01124c20,011be368)::DatabaseExecSQLResult dataset: 011b8880
04-04 07:44:36.826 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::Read TaskComplete stopped:0
04-04 07:44:36.826 GenericGet::TaskComplete
04-04 07:44:36.826 shareinno@test-pbx.de DbFilesGet(011be350,011b8048)::~DbFilesGet
04-04 07:44:36.826 shareinno@test-pbx.de IWebserverGet(connection id: 41653)::Close()
04-04 07:44:36.826 shareinno@test-pbx.de ExtendedHeader::Encode(): Extended header encoded (cid: 41653, h-len: 69, b-size: 73)
04-04 07:44:36.826 shareinno@test-pbx.de IWebserverGet(connetion id: 41653)::Send(): Sending message WSM_SEND_META_DATA (data size: 73)
04-04 07:44:36.826 54ED9A10 - 00 00 00 45 05 00 38 43 6F 6E 74 65 6E 74 2D 44 ...E..8Content-D
04-04 07:44:36.826 54ED9A20 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac
04-04 07:44:36.826 54ED9A30 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename=
04-04 07:44:36.826 54ED9A40 - 22 5E CC 6C BC A3 E1 65 33 2E 74 78 74 22 00 12 "^.l...e3.txt"..
04-04 07:44:36.826 54ED9A50 - 00 00 0B 00 04 01 01 00 00 .........
04-04 07:44:36.826 shareinno@test-pbx.de IWebserverGet(connetion id: 41653)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0)
04-04 07:44:36.826 shareinno@test-pbx.de IWebserverGet(connection id: 41653)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0)
04-04 07:44:36.826 shareinno@test-pbx.de IWebserverGet(connection id: 41653)::~IWebserverGet()
"


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Friday, 28 April 2023, 11:48 AM
Re: file access js runtime serversice
Hello Mladen,

i can not reproduce this problem.

04-28 09:43:21.042 GenericGet::GenericGet
04-28 09:43:21.042 GenericGet::WebserverGetRequestAcceptComplete
04-28 09:43:21.043 jsdbfilesexample@test.com WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 39085389)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr'
04-28 09:43:21.043 GenericGet::get->ForceDownloadResponse file3.pdf
04-28 09:43:21.043 jsdbfilesexample@test.com WebserverGetHandler(connection id: 39085389)::ForceDownloadResponse() fileName: 'file3.pdf'
04-28 09:43:21.043 jsdbfilesexample@test.com DbFiles(0021cd68)::Get user:0025caf4 id:104 offset:0
04-28 09:43:21.043 jsdbfilesexample@test.com DbFilesGet(0025b6a8)::DbFilesGet dbfiles:0021cd68 id:104
04-28 09:43:21.043 jsdbfilesexample@test.com PostgreSQLDatabase(001e07a8,001e2e20)::ExecSQL(PS) user:0025b6b4 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=104 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1
04-28 09:43:21.049 jsdbfilesexample@test.com PostgreSQLDatabase(001e07a8,0025b6b4)::DatabaseExecSQLResult dataset: 0025bae8
04-28 09:43:21.050 jsdbfilesexample@test.com DbFilesGet(0025b6a8,0025caf4)::Read TaskComplete stopped:0
04-28 09:43:21.051 GenericGet::TaskComplete
04-28 09:43:21.051 jsdbfilesexample@test.com DbFilesGet(0025b6a8,0025caf4)::~DbFilesGet
04-28 09:43:21.052 jsdbfilesexample@test.com IWebserverGet(connection id: 39085389)::Close()
04-28 09:43:21.052 jsdbfilesexample@test.com ExtendedHeader::Encode(): Extended header encoded (cid: 39085389, h-len: 66, b-size: 70)
04-28 09:43:21.053 jsdbfilesexample@test.com IWebserverGet(connetion id: 39085389)::Send(): Sending message WSM_SEND_META_DATA (data size: 70)
04-28 09:43:21.055 7EA708D8 - 00 00 00 42 05 00 35 43 6F 6E 74 65 6E 74 2D 44 ...B..5Content-D
04-28 09:43:21.056 7EA708E8 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac
04-28 09:43:21.056 7EA708F8 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename=
04-28 09:43:21.057 7EA70908 - 22 66 69 6C 65 33 2E 70 64 66 22 00 12 00 00 0B "file3.pdf".....
04-28 09:43:21.057 7EA70918 - 00 04 01 01 00 00 ......
04-28 09:43:21.058 jsdbfilesexample@test.com IWebserverGet(connetion id: 39085389)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0)
04-28 09:43:21.065 jsdbfilesexample@test.com IWebserverGet(connection id: 39085389)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0)
04-28 09:43:21.065 jsdbfilesexample@test.com IWebserverGet(connection id: 39085389)::~IWebserverGet()


Could you update the Manager, Webserver and the SDK(generic binary) to the 13r3 sr4 release and test it again?

May be check if the file name is already corrupted in the database.

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 2 May 2023, 06:57 PM
Re: file access js runtime serversice
Hello Andreas,

as mentioned earlier, everything is up to data and the same issue remains mixed
"
05-02 16:37:00.954 GenericGet::GenericGet 05-02 16:37:00.954 GenericGet::WebserverGetRequestAcceptComplete 05-02 16:37:00.954 shareinno@dev-pbx.de WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 11416)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr' 05-02 16:37:00.954 shareinno@dev-pbx.de WebserverGetHandler(connection id: 11416)::ForceDownloadResponse() fileName: '6�,Diles_delete.pdf' 05-02 16:37:00.954 shareinno@dev-pbx.de DbFiles(02748190)::Get user:02762668 id:0 offset:0 05-02 16:37:00.954 shareinno@dev-pbx.de DbFilesGet(027666e0)::DbFilesGet dbfiles:02748190 id:0 05-02 16:37:00.954 shareinno@dev-pbx.de PostgreSQLDatabase(026d18d0,026d0cf8)::ExecSQL(PS) user:027666f8 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1 05-02 16:37:00.955 shareinno@dev-pbx.de PostgreSQLDatabase(026d18d0,027666f8)::DatabaseExecSQLResult dataset: 0274f8f0 05-02 16:37:00.955 shareinno@dev-pbx.de DbFilesGet(027666e0,02762668)::Read TaskComplete stopped:0 05-02 16:37:00.955 GenericGet::TaskComplete 05-02 16:37:00.955 shareinno@dev-pbx.de DbFilesGet(027666e0,02762668)::~DbFilesGet 05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::Close() 05-02 16:37:00.955 shareinno@dev-pbx.de ExtendedHeader::Encode(): Extended header encoded (cid: 11416, h-len: 78, b-size: 82) 05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connetion id: 11416)::Send(): Sending message WSM_SEND_META_DATA (data size: 82) 05-02 16:37:00.955 791CDCE0 - 00 00 00 4E 05 00 41 43 6F 6E 74 65 6E 74 2D 44 ...N..AContent-D 05-02 16:37:00.955 791CDCF0 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac 05-02 16:37:00.955 791CDD00 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename= 05-02 16:37:00.955 791CDD10 - 22 36 D9 2C 44 0E 02 69 6C 65 73 5F 64 65 6C 65 "6.,D..iles_dele 05-02 16:37:00.955 791CDD20 - 74 65 2E 70 64 66 22 00 12 00 00 0B 00 04 01 01 te.pdf"......... 05-02 16:37:00.955 791CDD30 - 00 00 .. 05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connetion id: 11416)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0) 05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0) 05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::~IWebserverGet()

a) One of your messages differs from mine, because of log settings?
- Yours: 04-28 09:43:21.043 GenericGet::get->ForceDownloadResponse file3.pdf
- Mine: 05-02 16:37:00.954 shareinno@dev-pbx.de WebserverGetHandler(connection id: 11416)::ForceDownloadResponse() fileName: '6�,Diles_delete.pdf'

b) In my SQL statement the fd.file=0, but from database "files" table it should be 208 (in your statement it is 104):
- 05-02 16:37:00.954 shareinno@dev-pbx.de PostgreSQLDatabase(026d18d0,026d0cf8)::ExecSQL(PS) user:027666f8 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1

c) What I noticed is that only the first 3 characters of the file name are incorrect, the rest is correct (file size is still zero). Should i use the download link only from myApps?

I'll test again until Friday and see if I notice anything else.


Best regards
Mladen Topic
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 2 May 2023, 07:06 PM
Re: file access js runtime serversice
... for better readability of the log ...


05-02 16:37:00.954 GenericGet::GenericGet
05-02 16:37:00.954 GenericGet::WebserverGetRequestAcceptComplete
05-02 16:37:00.954 shareinno@dev-pbx.de WebserverMessageHandler(type: MSG_HANDLER_GET, connection id: 11416)::SetTransferInfo() resourceType: WSP_RESPONSE_BINARY, dataSize: WSP_FLAG_SEND_RANGE, flags: WSP_FLAG_NONE, etag: 'nullptr'
05-02 16:37:00.954 shareinno@dev-pbx.de WebserverGetHandler(connection id: 11416)::ForceDownloadResponse() fileName: '6�,Diles_delete.pdf'
05-02 16:37:00.954 shareinno@dev-pbx.de DbFiles(02748190)::Get user:02762668 id:0 offset:0 05-02 16:37:00.954 shareinno@dev-pbx.de DbFilesGet(027666e0)::DbFilesGet dbfiles:02748190 id:0
05-02 16:37:00.954 shareinno@dev-pbx.de PostgreSQLDatabase(026d18d0,026d0cf8)::ExecSQL(PS) user:027666f8 flags:0 statement: SELECT fd.data, fd.id, f.crypted FROM files_data fd JOIN files f ON (f.id=fd.file) WHERE fd.file=0 AND fd.id>=0 ORDER BY fd.id ASC LIMIT 1
05-02 16:37:00.955 shareinno@dev-pbx.de PostgreSQLDatabase(026d18d0,027666f8)::DatabaseExecSQLResult dataset: 0274f8f0
05-02 16:37:00.955 shareinno@dev-pbx.de DbFilesGet(027666e0,02762668)::Read TaskComplete stopped:0 05-02 16:37:00.955 GenericGet::TaskComplete
05-02 16:37:00.955 shareinno@dev-pbx.de DbFilesGet(027666e0,02762668)::~DbFilesGet
05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::Close()
05-02 16:37:00.955 shareinno@dev-pbx.de ExtendedHeader::Encode(): Extended header encoded (cid: 11416, h-len: 78, b-size: 82)
05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connetion id: 11416)::Send(): Sending message WSM_SEND_META_DATA (data size: 82)
05-02 16:37:00.955 791CDCE0 - 00 00 00 4E 05 00 41 43 6F 6E 74 65 6E 74 2D 44 ...N..AContent-D
05-02 16:37:00.955 791CDCF0 - 69 73 70 6F 73 69 74 69 6F 6E 00 61 74 74 61 63 isposition.attac
05-02 16:37:00.955 791CDD00 - 68 6D 65 6E 74 3B 20 66 69 6C 65 6E 61 6D 65 3D hment; filename=
05-02 16:37:00.955 791CDD10 - 22 36 D9 2C 44 0E 02 69 6C 65 73 5F 64 65 6C 65 "6.,D..iles_dele
05-02 16:37:00.955 791CDD20 - 74 65 2E 70 64 66 22 00 12 00 00 0B 00 04 01 01 te.pdf".........
05-02 16:37:00.955 791CDD30 - 00 00 ..
05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connetion id: 11416)::Send(): Sending message WSM_MESSAGE_HANDLER_CLOSED (data size: 0)
05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::SocketRecvResult(): Received message WSM_SHUTDOWN_COMPLETE (data size: 0)
05-02 16:37:00.955 shareinno@dev-pbx.de IWebserverGet(connection id: 11416)::~IWebserverGet()



Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Thursday, 11 May 2023, 07:35 PM
Re: file access js runtime serversice
Follow-up after remote debugging:

Access to an already released memory area. Was not always reproducible. Fixed in the upcoming 13r3 sr6:

https://wiki.innovaphone.com/index.php?title=Reference13r3:Release_Notes_SDK#144357_-_SDK:_Fixed_file_name_in_HTTP_GET_response_from_DbFiles_of_JavaScript_Runtime

Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 4 April 2023, 10:43 AM in response to Andreas Fink (innovaphone)
Re: file access js runtime serversice
Hello again,

had problems again to post the attached text directly ("Response blocked" - for security reasons).
Find more results from log analysis according the DbFiles interface in the attached screenshot.


Best regards
Mladen Topic
js_dbfiles_interface_2.PNG

Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Saturday, 18 March 2023, 11:56 AM in response to mitop
Re: file access js runtime serversice
Hello Daniel,

with the upcoming release of 13r3 we have changed behaviour of the DbFilesList message, so it can deliver any number of files in the list by utilising "limit" and "more" properties.

Check updated documentation on the JavaScript Runtime .

Best Regards
Andreas Fink
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Thursday, 15 June 2023, 11:38 AM in response to Daniel 450
Re: file access js runtime serversice
In the following repository an example app is implemented, that uses DbFiles for file upload and download on client side, and also provides a possibility to download files from service side:


We have no secure solution for direct file system write access for Linux subsystem at the moment (read access with FileSystem Library is possible).
Picture of mitop
Registered 4 years 40 days
mitop Thursday, 6 July 2023, 03:49 PM
Re: file access js runtime serversice
Hi Andreas,

i have an app that implements the features, that you mentioned with your example code. My problem actually is, that the app consumes a lot of memory. Using DBFiles from frontend raises memory consumption of the app service and seems not to be freed anymore (bigger files for upload or a lot of small files uploaded show the problem).
Similarly, when a file is downloaded the memory consumption raises, the code to send the data, is nearly the same as in your example, only that I have packed the shipping logic into a class/prototype and and pass a few more values to the function that calls the download logic.

Can you think of any reasons why the memory consumption occurs?


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Friday, 21 July 2023, 12:55 PM
Re: file access js runtime serversice
Hello Mladen,

I'm sorry for the inconvenience, the implementation of the DbFiles Library in the generic binary had some memory leaks, that should be fixed in the upcoming service release:



The following 13r3 development build of the generic binary could be used until 13r2 sr7 is published:

http://download.innovaphone.com/ice/download/p/published/generic/137863/

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 25 July 2023, 02:21 PM
Re: file access js runtime serversice
Hi Andreas,

as soon as the sr7 version is officially released i will test it again and get back to you. Currently it looks like the memory is still inflating during upload of a file (memory seems to jump after uploading several larger files).


Best regards
Mladen Topic
Andreas Fink
Moderator Registered 13 years 166 days
Andreas Fink (innovaphone) Tuesday, 25 July 2023, 02:27 PM
Re: file access js runtime serversice
Hello Mladen,

the 13r3 SR7 is released already:

Have you tested with the generic build 137863 and got still memory leaks?

Best Regards
Andreas Fink
Picture of mitop
Registered 4 years 40 days
mitop Tuesday, 25 July 2023, 07:00 PM
Re: file access js runtime serversice
Hi Andreas,

update to sr7 done, app generics replaced, but still memory leaks mixed

When uploading a file (100mb, multiple times) through DBfiles i can see in AP manager that the memory increases. Looks like deleting a file causes the same issue, furthermore, when deleting, the CPU seems to be used even after the deletion process is completed.
The app increases the memory once after start and it seems to remain constant, so far so good. Approximately every 1 hour (sometimes after 1 hour and 15 minutes), the memory consumption increases for no good reason. When idle, the app receives the changing statistics information (just like the AP manager does) and saves the newly arrived values to be able to access them later. Why this works for about one hour without memory leaks and then increases, is still a mystery to me.
Later and/or tomorrow morning I will test again, no idea what can be wrong here.

Best regards
Mladen

← You can define your color theme preference here