Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

When calling an external webservice to download a file in the database the server becomes unresponsive after a certain time for about 1 minute. The following messages are shown in the server console:

2024-03-26 11:04:55.54716 ISQL - Start downloading file
2024-03-26 11:06:45.309591 Task 000001FBCB4BD2C0(Request task 72) is trying get forbid mutex held by task 000001FBCB4BE580(Request task 78) for more than 60000 ms
2024-03-26 11:06:45.309604 Task 000001FBCB4BE580(Request task 78) state: worker=000001FBCB4CA430 wakend=0 waiting=0
2024-03-26 11:06:45.30962 Worker 000001FBCB4CA430 state: wakend=0 waiting=0 in_atomic=0 is_dedicated=0 in_critical_section=0 allow_forbid=0
2024-03-26 11:08:54.75974 Cache size adjusted to 1006720K
2024-03-26 11:10:45.598276 Cache size adjusted to 1006720K
2024-03-26 11:10:45.865185 ISQL - Finished downloading file

The size of the file is around 750 mb and it takes about 6 minutes to download.

What causes this error and how can we solve this behaviour?

I've found knowledge base article KBA2918035 mentioning the same problem in IQ server that was fixed in CR-821546. Could it be that the same problem occurs in SQL Anywhere 17?

asked 26 Mar, 06:30

Frank%20Vestjens's gravatar image

Frank Vestjens
1.3k354765
accept rate: 21%


I can probably guess what is going on here -- the forbid message is very telling. A 'forbidder' is a task (such as a checkpoint, a DDL, the start of a backup, etc) that is trying to get exclusive access to the database. Once a task wants exclusive access to the database, no new tasks can run and all running tasks should periodically "notice" this request for exclusive access then yield to the forbidder. I would guess that the mechanism used to do your download isn't checking for a forbidder.

This looks like a server bug and I will internally create a bug report. It might help if you can post exactly how you are doing your download.

permanent link

answered 26 Mar, 09:32

John%20Smirnios's gravatar image

John Smirnios
12.0k396166
accept rate: 37%

1

We have the following procedure to download the file

create or replace procedure usr.CQMaps_GetMatrix(in pGuid varchar(40))
url 'http://inf-p-cqm001:7000/api/matrix/!pGuid' 
type 'HTTP:GET' 
set 'HTTP(VERSION=1.1;EXCEPTIONS=OFF)'
header 'Accept: application/json';

The procedure is called in another procedure:

select * from usr.CQMaps_GetMatrix('4a311cc2-0c19-4962-85ef-60d84c2efbb1')
with (Attribute long varchar, "Value" long varchar, Instance integer);

Hope this will help.

(26 Mar, 10:33) Frank Vestjens
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×246
×95
×64
×7

question asked: 26 Mar, 06:30

question was seen: 221 times

last updated: 26 Mar, 10:33